Installing or uploading to Wordpress and getting a Memory limit error

LPTechs

New member
Sometimes when you are installing a new theme to Wordpress or even uploading your edits to Wordpress, there will be times that you get an error that says something like,

"You do not have enough memory to complete the task"

or something like that. A solution you can try is to increase the limits in your php.ini or .user.ini file in the public_html directory. Doing this will allow you to overwrite the default memory limits (which can sometimes be 2 MB) to where you need the limits at.

Keep this is mind when you do this, depending on the amount of resources you are allocated by your hosting company, they could be over used and could cause Internal Server Errors. You should consult with your hosting company before making this change.

Here are example increased limits you can use:

memory_limit = 192M
max_execution_time = 300
max_input_time = 300
upload_max_filesize = 100M
upload_tmp_dir = 128M
post_max_size = 128M
 
That's correct! php.ini as well as .htaccess file can do it for you. If you have CloudLinux then using cPanel >> Select PHP option, you can update any of the PHP values easily.
 
but using the php.ini specific to your website may not work. take your example.

memory_limit = 192M
max_execution_time = 300
max_input_time = 300
upload_max_filesize = 100M
upload_tmp_dir = 128M
post_max_size = 128M

will not work if the server admin has the servers php.ini set as

memory_limit = 192M
max_execution_time = 200
max_input_time = 200
upload_max_filesize = 50M
upload_tmp_dir = 64M
post_max_size = 64M
 
max_input_time can be set to -1 , execution time of 90 should be enough, but you can go with 300 if you get 500 error
 
If you get the Fatal error: Allowed memory size exhausted error, you need to increase PHP Memory limit in wordpress
- Edit the wp-config.php file
- Locate under /root folder
- Modify the PHP memory limit as follows:

define( 'WP_MEMORY_LIMIT', '256M');

- Save the file and refresh your wordpress site to see if the PHP memory issue is resolved.
 
If you get the Fatal error: Allowed memory size exhausted error, you need to increase PHP Memory limit in wordpress
- Edit the wp-config.php file
- Locate under /root folder
- Modify the PHP memory limit as follows:

define( 'WP_MEMORY_LIMIT', '256M');

- Save the file and refresh your wordpress site to see if the PHP memory issue is resolved.

Yes agreed. I also found this problem but after memory_limit 256M, I am able to do my job.
 
Top