Vesta Control Panel - Forum

Community Forum

Skip to content

Advanced search
  • Quick links
    • Main site
    • Github repo
    • Google Search
  • FAQ
  • Login
  • Register
  • Board index Main Section General Discussion
  • Search

Increase PHP memory limits

General questions about VestaCP
Post Reply
  • Print view
Advanced search
17 posts
  • 1
  • 2
  • Next
egeyazilim
Posts: 3
Joined: Mon Sep 28, 2015 6:41 am

Increase PHP memory limits
  • Quote

Post by egeyazilim » Mon Sep 28, 2015 7:10 am

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

Code: Select all

memory_limit = 128M


2-wp-config.php add this code,

Code: Select all

define('WP_MEMORY_LIMIT', '128M');
default-constants.php changed

Code: Select all

	if ( !defined('WP_MEMORY_LIMIT') ) {
		if ( is_multisite() ) {
			define('WP_MEMORY_LIMIT', '128M');
		} else {
			define('WP_MEMORY_LIMIT', '128M');
3-.htaccess adding

Code: Select all

php_value memory_limit 128M
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?
Top

skurudo
VestaCP Team
Posts: 8099
Joined: Fri Dec 26, 2014 2:23 pm
Contact:
Contact skurudo
Website Facebook Google+ Skype
Twitter

Re: Increase PHP memory limits
  • Quote

Post by skurudo » Mon Sep 28, 2015 10:51 am

Show us please full output from phpinfo

Code: Select all

<?php phpinfo(); ?>
Top

egeyazilim
Posts: 3
Joined: Mon Sep 28, 2015 6:41 am

Re: Increase PHP memory limits
  • Quote

Post by egeyazilim » Mon Sep 28, 2015 11:21 am

skurudo wrote:Show us please full output from phpinfo

Code: Select all

<?php phpinfo(); ?>
phpinfo link I sent a private message
Top

skurudo
VestaCP Team
Posts: 8099
Joined: Fri Dec 26, 2014 2:23 pm
Contact:
Contact skurudo
Website Facebook Google+ Skype
Twitter

Re: Increase PHP memory limits
  • Quote

Post by skurudo » Mon Sep 28, 2015 11:55 am

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.
Top

egeyazilim
Posts: 3
Joined: Mon Sep 28, 2015 6:41 am

Re: Increase PHP memory limits
  • Quote

Post by egeyazilim » Mon Sep 28, 2015 12:41 pm

skurudo 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.
I found the solution

Code: Select all

Include /home/$user/conf/web/httpd.conf
memory_limit will change in this file
Top

skurudo
VestaCP Team
Posts: 8099
Joined: Fri Dec 26, 2014 2:23 pm
Contact:
Contact skurudo
Website Facebook Google+ Skype
Twitter

Re: Increase PHP memory limits
  • Quote

Post by skurudo » Mon Sep 28, 2015 12:46 pm

egeyazilim wrote:I found the solution

Code: Select all

Include /home/$user/conf/web/httpd.conf
memory_limit will change in this file
somewhere you have settings with 32mb
You found your somewhere , nice! ;-)
Top

indteam
Posts: 12
Joined: Fri Jul 01, 2016 8:21 am

Re: Increase PHP memory limits
  • Quote

Post by indteam » Sun Dec 11, 2016 10:28 am

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
Top

Felix
Posts: 134
Joined: Tue Aug 04, 2015 7:15 pm

Os: Ubuntu 15x
Web: apache + nginx
Re: Increase PHP memory limits
  • Quote

Post by Felix » Tue Dec 13, 2016 8:07 pm

To increase PHP memory limits...

For Ubuntu Servers
Change setting php_admin_value memory_limit in file:

Code: Select all

/home/[user]/conf/web/apache2.conf
If you want the setting to apply to all new web sites that you create, change the setting in template files at:

Code: Select all

/usr/local/vesta/data/templates/web/apache2
For CentOS Servers
Change setting php_admin_value memory_limit in file:

Code: Select all

/home/[user]/conf/web/httpd.conf
If you want the setting to apply to all new web sites that you create, change the setting in template files at:

Code: Select all

/usr/local/vesta/data/templates/web/httpd
Top

locus
Posts: 63
Joined: Thu May 05, 2016 6:43 am

Os: Ubuntu 15x
Web: apache + nginx
Re: Increase PHP memory limits
  • Quote

Post by locus » Thu Dec 15, 2016 10:28 am

I went through this recently too, updating the templates and creating new ones, then rebuilding web was pretty straight forward.
Top

pandabb
Posts: 192
Joined: Sat Aug 08, 2015 3:03 am

Re: Increase PHP memory limits
  • Quote

Post by pandabb » Thu Feb 02, 2017 1:19 am

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
Top


Post Reply
  • Print view

17 posts
  • 1
  • 2
  • Next

Return to “General Discussion”



  • Board index
  • All times are UTC
  • Delete all board cookies
  • The team
Powered by phpBB® Forum Software © phpBB Limited
*Original Author: Brad Veryard
*Updated to 3.2 by MannixMD
 

 

Login  •  Register

I forgot my password