Increase PHP memory limits
-
- Posts: 3
- Joined: Mon Sep 28, 2015 6:41 am
Increase PHP memory limits
I use Vestacp,
Centos 6 64 bit.
I want Memory_limit increase 128M,
master value memory_limit128M ok. but local value 32M
Changes that I made
1-etc/php.ini changed
2-wp-config.php add this code,
default-constants.php changed
3-.htaccess adding
4-php.ini moving wp-admin directory
5-restart apache and reboot server.
phpinfo();
memory_limit local value: 32M Master value: 128M
How do increase memory_limit local value?
Centos 6 64 bit.
I want Memory_limit increase 128M,
master value memory_limit128M ok. but local value 32M
Changes that I made
1-etc/php.ini changed
Code: Select all
memory_limit = 128M
2-wp-config.php add this code,
Code: Select all
define('WP_MEMORY_LIMIT', '128M');
Code: Select all
if ( !defined('WP_MEMORY_LIMIT') ) {
if ( is_multisite() ) {
define('WP_MEMORY_LIMIT', '128M');
} else {
define('WP_MEMORY_LIMIT', '128M');
Code: Select all
php_value memory_limit 128M
5-restart apache and reboot server.
phpinfo();
memory_limit local value: 32M Master value: 128M
How do increase memory_limit local value?
Re: Increase PHP memory limits
Show us please full output from phpinfo
Code: Select all
<?php phpinfo(); ?>
-
- Posts: 3
- Joined: Mon Sep 28, 2015 6:41 am
Re: Increase PHP memory limits
phpinfo link I sent a private messageskurudo wrote:Show us please full output from phpinfo
Code: Select all
<?php phpinfo(); ?>
Re: Increase PHP memory limits
You have master value, it means you changed memory_limit in php.ini. But somewhere you have settings with 32mb - may me it's a hidden .htaccess file in the site root and that one was overriding all other values.
-
- Posts: 3
- Joined: Mon Sep 28, 2015 6:41 am
Re: Increase PHP memory limits
I found the solutionskurudo wrote:You have master value, it means you changed memory_limit in php.ini. But somewhere you have settings with 32mb - may me it's a hidden .htaccess file in the site root and that one was overriding all other values.
Code: Select all
Include /home/$user/conf/web/httpd.conf
Re: Increase PHP memory limits
egeyazilim wrote:I found the solutionmemory_limit will change in this fileCode: Select all
Include /home/$user/conf/web/httpd.conf
You found your somewhere , nice! ;-)somewhere you have settings with 32mb
Re: Increase PHP memory limits
I have same problem, php.ini alredy set 4000M and .htaccess php_admin_value memory_limit 4000M.
But wordpress always get Fatal Error: Allowed Memory Size of 33554432 Bytes Exhausted. I check from phpinfo also showing memory limit 4GB or 4000M , no hidden file or hidden php.ini on home/admin/web/
Previously my wordpress run on cpanel with ram 1GB no problem and fast. Now i moving to own vps.
Vps:
Centos 6.8 x64, Apache => default template
Ram: 6GB
Disk: 120GB
How to wordpress can work?
Tanks very much if anyone can share idea
But wordpress always get Fatal Error: Allowed Memory Size of 33554432 Bytes Exhausted. I check from phpinfo also showing memory limit 4GB or 4000M , no hidden file or hidden php.ini on home/admin/web/
Previously my wordpress run on cpanel with ram 1GB no problem and fast. Now i moving to own vps.
Vps:
Centos 6.8 x64, Apache => default template
Ram: 6GB
Disk: 120GB
How to wordpress can work?
Tanks very much if anyone can share idea
Re: Increase PHP memory limits
To increase PHP memory limits...
For Ubuntu Servers
Change setting php_admin_value memory_limit in file:
If you want the setting to apply to all new web sites that you create, change the setting in template files at:
For CentOS Servers
Change setting php_admin_value memory_limit in file:
If you want the setting to apply to all new web sites that you create, change the setting in template files at:
For Ubuntu Servers
Change setting php_admin_value memory_limit in file:
Code: Select all
/home/[user]/conf/web/apache2.conf
Code: Select all
/usr/local/vesta/data/templates/web/apache2
Change setting php_admin_value memory_limit in file:
Code: Select all
/home/[user]/conf/web/httpd.conf
Code: Select all
/usr/local/vesta/data/templates/web/httpd
Re: Increase PHP memory limits
I went through this recently too, updating the templates and creating new ones, then rebuilding web was pretty straight forward.
Re: Increase PHP memory limits
Hello, how can i apply this to my wordpress site using nginx only and phpfpm (no apache)
1. upload_max_filesize = 64M
2. post_max_size = 64M
3. max_execution_time = 300
i tried creating a php.ini on my root of my website but it doesnt work. any solutions?
Thanks
1. upload_max_filesize = 64M
2. post_max_size = 64M
3. max_execution_time = 300
i tried creating a php.ini on my root of my website but it doesnt work. any solutions?
Thanks