For many developers, WordPress is a go-to solution for both large and small jobs, however as with most things in life, it’s far from a perfect solution. Despite being a leading platform on the web, WordPress’ versatility makes it difficult to pinpoint the sources of failure when something breaks. While it’s impossible to explain every WordPress issue within this article, the guide below should help you navigate a few of the most common mistakes.
The White Screen of Death
For the few readers who are fortunate enough to have never encountered the white screen of death, this error consists of a blank screen loading when you try to access the site in question.
The two major causes of this error are compatibility issues from plugins and themes. If you can access your administration panel, the best way to pinpoint this error is to try deactivating all your plugins one by one, and if that doesn’t work, then try changing your theme to the default WordPress design.
The First Steps
If you can’t access your administration panel, you’ll have to manually deactivate the plugins and themes over FTP. After logging into your server, navigate to the plugins directory (usually wp-content/plugins) or the themes directory (wp-content/themes) and append ‘_old’ to the end of the name.
From there try accessing your admin panel. If you get in, you can try reactivating your plugins or themes individually until you recreate the issue. Once that happens, you’ll know the primary source of your issues.
For more advanced troubleshooting, you can also go into your wp-config file and set the WP_DEBUG value to true (as shown below):
define( 'WP_DEBUG', true );
After doing this, navigate to the page with the error and you should see the details of what is causing your errors. Once you are done, be sure to disable this feature by setting the value to false (as shown below):
define( 'WP_DEBUG', false );
Maintenance Mode after an Upgrade
Updates are a vital part of keeping your WordPress website functional. Occasionally, however, the system doesn’t clean up all the files from the process. If you ever get the message ‘Briefly unavailable for scheduled maintenance. Please check back in a minute.’ After updating your site, then you most likely need to remove your .maintenance file manually.
To do this, log into your website via your FTP program and delete the .maintenance file in your root folder. Your site should now work properly.
Reset Password System is not Working
The Simple Method
If you’re using the default admin user (i.e. your username is admin) you can reset your password via FTP.
Access your site via FTP and download your active themes functions.php file
At the beginning after the opening
< ?phpline, add the following:
wp_set_password( 'password', 1 );. In this command, the 1 is the user ID, and password should be changed to your desired password.
Upload this file to your site.
After logging in, go back to the functions.php file and remove the code you just entered because it will otherwise reset your password every time the user logs in.
The Complex Method
For those times when you lose the admin password and having a reset password link emailed to you isn’t working, you’ll need to reset your password manually. The best way to do this is to use phpMyAdmin to edit your WordPress database. You can also edit the database from the MySQL command line, but phpMyAdmin greatly simplifies the process.
First, convert your desired password into an MD5 hash by using a hash generator. Then complete the steps below:
Navigate to your WordPress database
Look for the row containing your username
user_passvalue within that row with the hash you generated before completing these steps
Apply the changes you made
On many servers, the default memory amounts allocated to WordPress isn’t sufficient to handle extensive customizations to WordPress. Fortunately, increasing your WordPrss memory limit can be done by adding the following line to your WordPress config file:
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.
A Proactive Way to Protect Yourself
In a worst case scenario the best solution to resolving difficult WordPress errors is to roll back to an older backup that you have on hand. One of the ways to streamline this process is to explore your managed WordPress hosting options. If you choose to handle all site maintenance yourself, then you should ensure that you at least have a rolling cycle of daily, monthly and weekly backups.