November 3, 2018
Years ago, WordPress, the blogging platform, broke out as one of the most popular content management systems used across the Internet. Millions of webonauts found the platform’s extensibility, ease of customization, and design flexibility to be a great fit for their needs and budgets.
WordPress sites, however, are a bit like gardens. Look away for too long, and weeds, brambles, and weasels have a funny way of finding their way in and choking the life out of the thing. Just because WordPress is so popular doesn’t mean that everything’s going to be super rosy during deployment or upkeep. In fact, like every other programming project ever, things can and do go wrong.
Forefront Software Rule of Thumb: Always backup your WordPress site. Test your procedure for unpacking your backup by installing the backup onto a test server. It’s heartbreaking to get a call from someone who’s brother or friend, “the developer” has accidentally nuked their site. The only sure-fire way to recover from a server breakdown, a hacking, or incompetence, is to have an installable payload backup of your site. We use plugins that let us backup to Dropbox, i.e., Backup Buddy (paid) and Wordpress Backup (free).
Ok, here is our list of the top areas to focus on when troubleshooting a broken WordPress site:
Conflicts between your plugins are probably the #1 culprit that can break your site. Or slow it down. The insidious part about plugin conflict is that sometimes it’s very subtle. (read: difficult to detect even when you’re on the lookout for it). There are close to 50,000 plugins available for WordPress (49,626 to be exact). That’s what their site says (https://wordpress.org/plugins/). Hunting down the culprit plugin can be time-consuming, especially, as in most cases, the site is live. A friend of mine likens this to trying to change a flat tire without stopping the car.
Here’s how to hunt down problem plugins:
A brief note about running a local copy of your site: Very often the local version of PHP will be different than what’s on the live server. Memory limits at the host might also differ slightly. These differences mean your dev environment may not be 100% the same as your live environment. You can burn up serious hours hunting for ghosts.
Access to your server logs is invaluable. Yes, they can be mind-numbingly inscrutable to the untrained eye. But logs help you get to the heart of a problem, fast.
To start error logging,
Make sure the following lines are in your wp-config.php file
NOTE 1: Only when there is something to be recorded, will the log be created. By default, it can be found in wp-content/debug.log
NOTE 2: You’ll want to have logging enabled during development or if you’re debugging in production. It’s bad practice to have logging running on your production server all the time.
We know firewall Plugins are popular. However, we don’t usually use them. Instead, there are Linux tools we install on the server to keep it locked down. We always install iThemes security on our WordPress sites (https://ithemes.com/security/). When configured correctly, this plugin provides everything you need. We firmly discourage installing multiple security plugins because of Plugin Conflict Hell. (see above).
If the problem is a broken UI, you’ll need to clean up and optimize the stylesheets. This means combining multiple files into one, testing, resolving conflicts, and minifying it. Again, here too you’ll want to check for Plugin conflict. Save yourself some headache. Install as few plugins as possible.
Adding external links to your sites is good for SEO. Likewise, adding links to pages within your site is de rigueur for smart search engine optimization policy. However very often links to external websites, pages, resources or diagrams can change. Broken links are bad. They can negatively impact your search engine optimization (SEO). Broken links don’t strictly fall under the heading of fixing a malfunctioning WordPress site, however rooting out nonworking links keeps things tidy (and Google happy). Consider installing a link checker to automatically test links in WordPress and inform you if any have become severed.