Insufficient Memory Error
On most shared (cheap) hosting, the default memory allocated to WordPress just isn’t sufficient to handle setups with a ton of plugins or database-heavy plugins. These can include translation plugins, plugins that run automated processes such as image management, gallery, link checking or SEO plugins. In many cases, you can increase this limit yourself.
First, try adding the following to your wp-config.php
define( ‘WP_MEMORY_LIMIT’, ’64M’ );
The above command sets the WordPress memory limit to 64M. If you need a higher or lower limit, replace that value with the desired amount.
This may not be enough if your issue is related to script memory. In that case you will need to increase the PHP limit set in the php.ini.
Can’t Save Changes Or Refresh Is Not Triggered in Customizer
When working on a Layers page in the Customizer or editing an existing Layers page with a lot of content, you will make a change but the refresh will not happen (or happens after a very long delay) and the Save Changes button is disabled or grayed out.
This is most often the cause of a server-side error related to your PHP configuration, triggered by too much widget data. More than 10 widgets in a page, or 20 columns in a Content Widget etc can generate more data than your server is setup to allow, or your PHP version may be outdated and unable to interpret the instructions it is receiving.
- Ensure you are on the latest Layers version, and all extensions have been updated.
- Deactivate plugins. Extensions that are more than 2 months outdated should be deactivated until an update is available. See Troubleshooting Customizer Performance for detailed steps to troubleshoot plugins to ensure none of them is the cause.
- Contact your host to inquire about the following:
- PHP version should be 5.6
- PHP safe_modeshould be off
- Increase memory limits. Not all hosts will agree to this, in which case you should check out How to Speed Up My Website and consider a WordPress host. You may also reduce the amount of information on one page, or divide widgets with a huge number of columns between two widgets (remove the top margin and padding under Advanced from the second widget)
If you have access to your php.ini, you can try the following adjustments – note this is advice only and you do it at your own risk. We recommend this primer on the PHP config if you have no idea what you’re doing. Your host may also offer additional documentation on finding and configuring this file.
- Locate or download a copy of your php.ini and open it in a plain text editor
- Use Cmd+F/Ctrl+F to find
- By default this is commented out and set to 1000.
;max_input_vars = 1000
- Remove the semicolon and change the number to 3000 or 4000 to start.
max_input_vars = 3000
- Save your changes and connect to your server.
- Rename the old php.ini to php.ini.old.
- Upload the changed php.ini file to replace the one you just renamed.
- Reboot your server. If you do not have access to reboot, you may have to wait up to 24 hours or request your host restart it.
Another way is to add following lines to your .htaccess file
- php_value post_max_size 100M
- php_value max_execution_time 300
- php_value max_input_time 300
- php_value max_input_vars 3000
Customizer Won’t Load
You may suddenly begin having issues with your customizer loading on all or some pages, where the left-hand sidebar loads with only some or all tabs, but the preview never loads. This is almost always due to a conflicting script or widget configured to load on the page you are trying to customize.
To solve it, go to Appearance > Widgets and review your widget panels for the widgets you know display on the page with the problem (not including builder widgets). Drag them into the lower-left “Inactive Sidebar Widgets” zone to temporarily deactivate them, then try your customizer again. If this solved it, the problem widget is likely any widget that asks for an API key or needs to connect to a 3rd party, including many Newsletter, Twitter or Facebook widgets. You may safely put the widgets back after finishing your business in the customizer.
Very often the Cause is the low “execution time” setting. The fastest way to change it without editing any files is to install and activate the free “All In One SEO” plugin. In it’s Performance settings you can raise the “Exetution time” limit and the “Memory limit”.
To be continued…