WP Memory Limit
If you see the WP Memory Limit warning on the Site Status screen, this means the WP Memory setting for your site is lower than our recommended 256MB.
OptimizePress requires a minimum of 128MB of WP Memory to run properly - and we recommend 256MB if possible.
If you have a lower memory setting, this can lead to slow response times and issues with saving your page (as WordPress does not have enough Memory to save the page content to the database).
This can also be a cause for critical error messages, or memory exhaused errors on your WordPress site.
How to increase WP Memory Limit (Contact Host)
** RECOMMENDED **
If you're not technical and are not familiar with hosting configuration files, you are best to contact your hosting company and ask them to increasey our WP Memory limit.
You can send them a message like this:
I am using WordPress on my site hosted by you, and some plugins require more WP/PHP Memory than I currently have allocated to my server.
Please can you increase my WP Memory to 256MB (or minimum of 128MB) and my PHP Memory Limit to 256 or 512M (or greater) if possible.
All good hosting companies will be happy to increase this allowance for you. We've also included a note about PHP Memory limits in this message as these will also be required. You can edit this part out if you think that your PHP memory limit meets the requirements.
If your hosting company will not make this change for you, it's likely you're either using a sub-standard hosting company, or you are on a very cheap hosting plan.
We always recommend choosing a host that provides hosting suitable for business use - often cheaper hosting companies impose strict server limitations which make them only suitable for the most basic personal sites.
Increasing your WP Memory Limit (Manual)
As part of increasing your PHP limit, you may also need to increase your WP Memory Limit. All hosting companies will be able to do this for you - but you can also do this yourself following the steps below:
Step 1: Go to your site main folder where WordPress is installed and find the wp-config.php file
Step 2: Open this file and locate the line ‘/* That's all, stop editing! Happy publishing. */'
Step 3: Paste this just above that text:
define( 'WP_MEMORY_LIMIT', '256M' );
How to increase PHP Memory Limit (Manual)
As part of increasing your WP Memory limit, you may also need to increase the PHP Memory limit for your site at the server level.
We recommend contacting your hosting company support to do this - but if you want to increase the PHP Memory limit yourself, you can follow these steps.
Please remember that if you are not familiar with hosting config files, we strongly recommend contacting your hosting company, as you can break your site if you use the wrong settings here.
Please also be aware that on some stricter hosting environments, adding these codes may not work, and you may still need to contact your host to do this for you.
Edit your PHP.ini file
The first place to try and increase your PHP Memory Limit is the PHP.ini file. This is located in the root (main folder) of your site.
If you’re using shared hosting, you will not be able to access your PHP.ini file, so see the next step below instead. If you do have access to PHP.ini, you’ll most likely find it in the root folder, but this could vary depending on your host.
To increase the PHP memory limit and upload limit, change the following lines in PHP.ini
memory_limit = 512M <br>upload_max_filesize = 12M<br>post_max_size = 13M<br>file_uploads = On<br>max_execution_time = 180
Edit your .htaccess file
If you're on shared hosting and cannot access your PHP.ini file, the alternative process is to modify your .htaccess file.
Your .htaccess file starts with a dot because it is a hidden file. If you don’t see it in your root folder, check to make sure that your SFTP file manager isn’t keeping those files hidden from view.
To increase the PHP memory, you’ll add the following to your .htaccess file:
php_value memory_limit 512M <br>php_value upload_max_filesize 12M <br>php_value post_max_size 13M