Increase the Memory Limit on WordPress and WooCommerce
WordPress is a great Content Management System (CMS), that allows easy editing, updating, and publishing of content on your website. Sometimes you can run into issues with plugins or themes depending on how high your memory limit is set in PHP. This is a step by step guide to help show you how to increase the memory limit on WordPress / WooCommerce.
1. Edit your wp-config.php file
Log into your FTP program, we recommend Filezilla FTP Program if you do not have one and download a copy of your wp-config.php file. Open the file in your text editor, for webmasters we recommend using DreamWeaver, if you do not have DreamWeaver you can use notepad on Windows OS or TextWrangler on Mac OS.
Add the following code just above the line that reads,
/*INCREASE MEMORY LIMIT*/
Your file should now look like this:
Upload the file back to the root directory of your WordPress installation. If prompted, select “Overwrite” as the option when uploading the file through FTP.
2. Update your php.ini memory limit
If you have access to your php.ini file, you need to increase the memory limit allowed to WordPress / WooCommerce there as well. Search your FTP server for a php.ini file (most hosts keep this file in the root of the public_html folder. If you do not have a php.ini file, you can try creating one and uploading it to the root. Otherwise you will need to contact your host to find out how to edit the php.ini.
Once you find the php.ini file, download a copy and open it with either Notepad or Dreamweaver. Find the line that starts with memory_limit and change it to the following:
memory_limit = 128M ; Maximum amount of memory allowed for scripts
Upload the edited copy of your php.ini file back to the server via FTP.
3. If you don’t have access to the php.ini file
If you don’t have access to the php.ini file, you can attempt to change the memory limit via the .htaccess file in the root of your server. Download a copy of the .htaccess file on your computer, and open it using notepad or Dreamweaver. Add the following line as the top most line in the .htaccess file:
php_value memory_limit 64M
Rename the .htaccess on the server to backup.htaccess in case these changes fail. Upload the new .htaccess file to the root of your WordPress installation.
Need help increasing the memory on WordPress
VOLPC, LLC is a complete website design and development agency. If you can’t (or don’t want to) follow the instructions above to increase the memory limit on your WordPress / WooCommerce installation we can help you! Contact us today if you need help implementing a fix for memory related issues on your WordPress site.