Common WordPress Maintenance Woes

Keeping WordPress running smoothly requires some routine maintenance. Most of the time that’s easily handled by regularly installing routine updates. However in rare cases routine maintenance can be a battle. Here are top 5 common WordPress maintenance woes and how to overcome them.

#1 Infrequently applying updates.

You should not rely on manually installing WordPress updates. That is prone to inconsistent updates, not to mention it’s a huge waste of time. Keeping after routine updates are as important as backups. So treat it that way and automate those updates!

One solution is to use bulk WordPress management tools to automate WordPress updates on a preset schedule. ManageWP is great free option. I use CaptainCore which is an SSH management system that I built. Whichever the tool, make sure to pick a schedule that works with you. Update everything at least once every 2 weeks during a time slot that you’ll be around to check your inbox for any problems.

CaptainCore crontab scheduling production updates weekly and staging updates quarterly.

#2 Theme and plugins without license keys.

Paid themes and plugins typically only receive updates if they have valid license information. WordPress doesn’t come with a built-in license management system. That means every theme and plugin author has to come up with their own way for handling paid updates. This makes it a bit of a mess as there is no standard process for adding proper license info.

While I don’t have a good solution for handling license keys, here are a few recommendations for catching stragglers. Trust me, any action here is better then none and will improvement update coverage.

  • Every quarter hunt for outdated themes or plugins and attempt to resolve the underlying license issue. Sometimes manually updating a plugin to the latest version will resolve update issues due to bad update code. Often you simply need to add the proper license info and reactivate in order to restore regular updates.
  • Look for patterns. Make a list of repeat known bad plugins and themes. There tends to be just a few themes/plugins which commonly have issues. There are many reasons why. Maybe it was built in an overly complex way or came bundled with something that is now discontinued.
Did you know every time you update website internal urls ACF Pro license will break and need reactivated? Yes that’s just one example of a nuisance plugin which I deal with quite frequently.

#3 Post update dialogs.

Some plugins require extra actions after new updates are applied. These post update requirements are annoying to deal with. Whenever I spot a required banner I try to come up with a way to handle them over SSH which they can be applied to all WordPress sites automatically rather then clicking through the update screens manually. Here are a few common WP-CLI command related to post updates commands.

# Handle WooCommerce database updates if installed
if $( wp plugin is-installed woocommerce ); then 
    wp wc update

# Updates WordPress core database
wp core update-db

# Core updates on multisite network
if $( wp core is-installed --network ); then 
    wp core update-db --network

# Handle WooCommerce database updates on multisite if installed
if $( wp plugin is-installed woocommerce ) && $( wp core is-installed --network ); then 
    for site_id in $( wp site list --field=blog_id ); do
        site_url=$( wp site list --field=url --blog_id=${site_id} )
        if $( wp plugin is-active woocommerce --url=$site_url ); then
            wp wc update --url=${site_url}

# Hides Akismet privacy popup
wp option update akismet_comment_form_privacy_notice hide

This script is just a sampling. Anything can be scripted. Deploying custom code to bulk sites can be accomplished using SSH.

Bulk deployment within CaptainCore handled via SSH.

#4 Outdated PHP code.

Updating PHP will uncover incompatible PHP code. That can result in PHP fatal errors or other unexpected behavior. Resolving PHP incompatible code can be a bit of an undertaking and require manual patching. That said most PHP errors are common and fairly well searchable. A few tips after upgraded your website to latest version of PHP.

  • Check web server error logs for any PHP fatal errors
  • If found check if there are any updates for the affected theme or plugin. If not reach out author for updated fix.
  • Attempt to solve yourself by copy and paste PHP error into Google.

A good web host will go along way in helping to manage PHP. I highly recommend only using a web host which supports the latest version of PHP and allows you to swap PHP versions per website. Being able to roll PHP forward and backward is crucial for troubleshooting purposes.

Kinsta’s PHP Switcher

#5 Errors after WordPress updates.

While it’s a good idea to check your site after doing a WordPress update, it’s not very practical to handle manually. Unless you lock down the website it’s also not possible to control when updates are applied. Some plugins self-update on their own schedule. Some plugins might get updated by other WordPress administrators. The solution is to utilizing a site monitor. If something major happens and breaks your site then any decent site monitor should let you know.

Since WordPress 5.2 there is now a bundled “white screen of death” protection. Major problems which previously would take down a website have been replaced with a recovery mode. In recovery mode you can still access WordPress’ back end in order to fix your site. I highly recommend defining RECOVERY_MODE_EMAIL within wp-config.php to make sure that you get notified regarding any critical issues.

When things break you need to know specifically which code files changed since it was last working. So keep a record of what changed. Most WordPress management tools only track changes they make. That’s not enough. You can only get the full details from a backup history or by rolling your own solution.

My solution for tracking changes involves an automatic nightly SFTP sync and check into a git repository. This tracks just themes, plugins and version information. If no files changes are detected, then no new commit. This level of detail is invaluable for troubleshooting and quickly resolving issues.

Daily file check for changes within CaptainCore
Individual git commit within CaptainCore
List of files from individual git commit with CaptainCore
Individual file compare