Troubleshooting the most common “fatal error” cases on WordPress
This is life saver!
Most probably, you are reading this because you got a fatal error right after activating one of Plethora’s (or any other premium) WordPress themes. First of all, don’t panic! Probably after you have finished reading this, you will have the solution in your hands.
Every time a ticket that indicates a fatal error on theme activation arrives on our support desk, the first thought is always the same:
“just another WordPress site…with inadequate hosting configuration”.
For the 99% of the cases, this is true! That’s why we came up with some useful tips that will save time for all of us! Please note, that the following recommendations would fit any WP installation that includes a modern premium fully featured theme and 5-6 basic plugins.
Always use the latest PHP version available.
Even if WordPress itself supports PHP 5.2, we don’t agree that this should not be the case for our themes too, so we decided to raise this limit to PHP 5.4. From a technical point of view, this was not a hard decision at all, why try to produce and maintain obsolete code just to support a PHP version that is considered non secure and abandoned a long time ago? The hard part had to do with a few clients that would be too frustrated to contact their host support and ask for a PHP upgrade to the latest version available, well, in our point of view, this is a good chance for you to learn how to get the most out of your hosting package and deliver a fast and secure website. Isn’t this cool?
Do you have enough memory?
After PHP 5.2, the next “usual suspect” is a low memory limit or just insufficient memory settings. We have checked that on >= PHP 5.4 installations, 64MB of RAM are enough for our themes to work. However, we can’t be 100% sure that your installation will work fine with this amount of RAM, for the simple reason that our theme functionality is just a part of your final WP installation…and sometimes a minor one! Since this is not the purpose of this article, let’s roughly say that the correct amount of memory is affected by the PHP version, theme and plugins functionality and finally the expected traffic for your website.
So, for a low traffic Plethora theme website, with 5 basic plugins (security, SEO, contact management, page builder and cache) we suggest a minimum 128MB of RAM. If you decided to launch a small WooCommerce shop or go multilingual with WPML, then you should consider raising this to 254MB. For those seeking the golden rule, you should just go with the highest amount possible. If you ask your host to provide you all the memory available, and they come up with 64MB, then you should just consider upgrading your hosting package.
Do you actually use ALL the memory available?
Let’s say that you are paying for a good hosting package, with PHP 5.6 and 512MB RAM, but still getting fatal errors regarding insufficient memory. I have some interesting news for you…having 512MB available to your package does not necessarily mean that WordPress will use it all. So please open your wp-config.php file and add/update the following line:
This will allow WordPress to use all the memory available. Note that you should use the actual amount of RAM that fits in your case.
Sum up…and send it to your host!
Hosting companies will rarely take the initiative to configure your hosting package according to your needs (on some hosting companies not even for what you’ve paid for!). So, no matter if you have technical issues or not, you should always ask your host for the following:
- The latest PHP version available…5.4 should be the minimum while 5.6 would be just fine!
- The latest MySQL version available… 5.0.15 should be the minimum, while 5.6 would be just fine!
- To make sure that the memory_limit value in your PHP.INI (the PHP configuration file) is set to the maximum available. Ask 128MB at least!
- The mod_rewrite Apache module installed (for clean URIs known as Permalinks)
- Finally, don’t forget to ask for a report for your hosting account…this way you will have a clear picture of your hosting capabilities and, in the end of the day, it will help you decide if you should upgrade your package or not!
If you need a quick and safe advise on choosing a reliable WordPress hosting company, check out Siteground. We never had any problems with our installations there.