It’s not easy to keep a WordPress website up and running 24/7. Maybe that is why there are so many online services that constantly monitor your website and notify you when it is down. In some cases, the website may still run but there are various errors displayed. This can be overwhelming and very stressful for non tech-savvy users, especially when there is no obvious solution. In this article, we list 5 simple things that you can do to keep your website up and running smoothly.
1. Disable Debug Mode
A very common mistake that a lot of WordPress users do is keeping WordPress debug mode activated in the production site (live site). Debug mode is used to capture all kinds of PHP errors and custom user notification only for development purposes and should never be used in production. The typical result of this mistake is a lot of errors on the both front-end and back-end of the WordPress website. Read How to Deactivate WordPress Debug Mode to learn more on how to avoid this issue.
2. Turn Off PHP display_errors
The WordPress CMS was built using the PHP programming language. Every PHP application has at least one configuration file that is loaded on the website server. This file contains different configurations that tell PHP how to handle the website’s code. There are many settings in this file but your main concern is in the display_errors setting. Locate and open the php.ini file on your server and make sure that display_errors is equal to either 0 or Off.
3. Install CodePinch plugin
CodePinch is available as a free to download WordPress plugin that will constantly monitor your website for any PHP errors and send notifications to your email address. When any error occurs, within hours you should be able to apply fixes to the error for a very low cost.
4. Update plugins and themes regularly
Keeping your website up-to-date is one of the most important tasks, especially now that so many hosting providers that are migrating from PHP 5 to PHP 7. There are a lot of deprecated or removed functions in the latest PHP 7 and if any old plugin or theme utilizes those functions your website will crash. If you have the option to update your PHP version manually, first make sure that all your plugins and themes have the latest release.
5. Keep a “mirror” of the website
The best maintenance practice is to keep a “mirror” copy of the website either on your local computer or on a separate subdomain. This provides you the ability to verify that all is working as expected with the different plugins and themes before you install or update plugins and themes on the production site.
If you decided to have a “mirror” of your website on the local computer, you can use free solutions like XAMPP (for Windows) or MAMP (for Mac). They are very easy to install and they will automatically set up everything you need. After that you can simply move all files and database from the production server to your local computer.
If you opt for a subdomain, simply create a subdomain and copy all production files to the subdomain folder.
There are a lot of in-depth tutorials available online on how to configure a server on your local computer or create a subdomain.
Make sure to do these simple things to keep your WordPress website up and running smoothly. Being proactive can prevent error filled and broken pages.