How to Troubleshoot WordPress Errors and Glitches

define(‘CONCATENATE_SCRIPTS’, false);

5. Images Aren’t Loading or Errors on Uploading Images

You can often search for the exact error message you’re getting in Google and find instructions on how to fix it.
If all else fails, you may have to reinstall WordPress or restore from a backup.
This can be caused by several reasons and it’s often an annoying problem to fix, as you don’t get any clues as to what’s wrong.

1. Deactivate Plugins

This problem is also caused by concatenated JavaScripts that aren’t working properly. To fix this issue, add the following line of code to your wp-config.php file:
Chances are, you’re not the first person to ever experience the error that’s causing you problems. Many WordPress errors are common and well known and there’s often an easy fix.
To fix it, all you need to do is go into the file in question, find the line of code with the error and correct the syntax. You can find a more detailed guide to fixing this problem here.
9 times out of 10, you’ll find that it’s a rogue plugin that’s causing your problems. Outdated or buggy plugins can cause a whole range of problems and you could be tearing your hair out trying to work out how to fix them, when all you needed to do was deactivate the offending plugin.
If your WordPress version is out of date, it’s always worth updating to the latest release and seeing if it solves the problem. The same goes for plugins and themes that are out of date.

2. Temporarily Change Your Theme

If you’ve just installed a new plugin and your site breaks, the culprit will be pretty clear. Simply deactivate and delete the plugin. If you really want to use this particular plugin, have a look at the troubleshooting section of the developer site and see if there are any common incompatibilities or other issues that can be easily sorted.
Even if you have the latest version of WordPress installed, you can re-install it easily with the button on the updates section of your dashboard.
Once you’ve reset your permissions, with any luck your images should be working again.
Before you do any of these steps, you should make sure to backup your whole site. Ideally you should also have a backup from before the error occurred, so in the worst-case scenario you can just restore your site from backup.

3. Check Your .htaccess file

To check your file permissions, log into your site using FTP and navigate to the wp-content directory. These instructions are for the Filezilla FTP client but they should be similar for other FTP clients.
If you’ve lost your password, you can reset it manually from your WordPress database. You can find full instructions of how to do this at the WordPress Codex.
define(‘WP_DEBUG’, false);

Of course restoring from backup is always the final option and I hope I’ve put across the importance of backups strongly enough! Even the most catastrophic WordPress problems can always be fixed if you have a backup.

4. Upgrade/Downgrade WordPress or Reinstall the Core Files

The correct way to edit a theme is to create a child theme containing your customizations. Your changes will then be safe when you upgrade to a new version of your theme.
You can also find this setting in your wp-config.php file. Access the file via FTP and add the following line of code:
Parse Error: Syntax error, unexpected ‘<‘ in home/admin/public_html/wp-content/theme/functions.php on line 22

If you’ve installed a new theme and you’re getting strange error messages, check the support files for incompatibilities – it may be that you have a plugin installed that is already embedded into the theme, or it may not play nicely with some other plugins for whatever reason.
If you didn’t create a child theme and your site is already broken, you have little choice but to restore from backup. You can then try and extract your edits from the original code to a new child theme before you upgrade the theme. The other option is not to update the theme at all but this is not usually the best idea as outdated themes may pose a security risk.

5. Enable Debug Mode

If you’ve just updated a plugin, it’s possible that some new bugs were introduced. Your best course of action in this case is to rollback to a previous version of the plugin and check the developer site to see if anyone else has reported the same problem. Sometimes there may be a solution, or you may need to report the bug to the developer so it can be fixed.
define(‘WP_MEMORY_LIMIT’, ’64M’);

Luckily this is an easy fix. You can simply deactivate plugins by renaming their folders temporarily (I usually append something like “-temp”) and then you should be able to log into your site as normal.

6. Increase your PHP Memory Limit

The .htaccess file contains instructions for the server. Sometimes it can become corrupted and this may cause error messages that start “500 Internal Server Error”.
As much as I love WordPress, I’ve certainly done my share of swearing at my computer because the WYSIWYG editor won’t load properly or when I check in on one of my websites and find the theme has decided to self-destruct or there are suddenly database connection errors all over the place.
Thankfully, this type of error message is one of the most helpful within WordPress as it tells you not only the file that includes the error, but also the exact line that contains the error and what exactly the problem is.

7. Talk to Your Webhost

If you go to edit or create a new post and see what looks like a blank screen or buttons missing, you’re experiencing a very common problem. The text is actually usually there but it’s white (try highlighting it with your cursor).
If you’ve eliminated plugins as causing the errors you’re experiencing, you’ll want to check if your theme is the issue next. To do this, change your theme to one of the WordPress default themes such as Twenty Seventeen and see if the error goes away. If it does then you’ll know your theme is causing the issues and you can either try and resolve them (check with the theme developer for advice) or use a different theme altogether

8. Restore From Backup

Bugs in a new release of WordPress occasionally cause problems too. If you suspect this to be the case, you can install an older version of WordPress and see if this fixes the error.
Right-click on the uploads folder within this directory and select “file permissions”. The permissions for this folder and the files within it should be 755. Make sure you select the option to “recurse into subdirectories” and “apply to directories only” so that all the folders inside the uploads folder are also given the correct permission.
Many modern themes have plugins and other code embedded into them and this is also a common cause of problems.

Common WordPress Errors and How to Fix Them

If trying to access a file on your website that you know exists gives you a 404 error, this is most likely due to an URL rewrite bug in the .htaccess file.

1. Custom Edits to a Theme Disappear or Break on Updating Theme

Often errors are caused by incorrect configuration on your web server and if you’re on shared hosting, you probably won’t be able to fix this by yourself. Some hosts also control setting such as the PHP memory limit mentioned above and will need to change them for you.
Hopefully the tips here should have helped to fix some of the most common problems you’re likely to experience with WordPress.
If you’ve followed all the advice here, and your site is still behaving oddly, it’s also worth scanning it for malware in case it’s been infected by malicious code that is causing the problems.

2. WordPress White Screen of Death

I’ve found the best way to deal with this situation is to deactivate all plugins and see if the problem is fixed. If is then you know a plugin is causing the problem and you can activate each plugin one by one until you find the one that is causing issues. If you’re still having issues even when all the plugins are deactivated, the problem may be caused by your theme or something else and you’ll need to move onto the next step of troubleshooting.
Once you’ve found the file, rename it to something like “.htaccess-old”, which will stop it being used and reload your site.
By default, most errors and warnings are repressed by WordPress. You can enable them by editing your wp-config.php file, changing the following line of code from false to true:

  1. Increase the memory limit
  2. Disable plugins
  3. Switch to a default theme
  4. Enable debug mode

It’s also worth trying to access the site on a different browser. If it works using the other browser, try clearing your browser cache and seeing if this fixes things.

3. Can’t Access WordPress Admin

Sometimes this fixes problems if any of the core files have been corrupted. You can also do this manually by downloaded the latest version of WordPress and replacing the contents of your wp-admin and wp-includes folders via FTP. This shouldn’t affect any of the content on your site.
To be fair, the core code of WordPress is very well coded and thoroughly tested, so there are rarely errors with it. The problem with WordPress comes with the multitude of third-party plugins and themes that greatly extend the functionality, but also introduce their own bugs, incompatibilities, and issues.
So if you’ve suddenly come across a problem with a WordPress site and want to try and sort it out on your own, use this simple step-by-step guide to troubleshoot and resolve it as quickly as possible.

4. WordPress Visual Editor Doesn’t Load Properly

If your site is taking forever to load and you’re getting timeout errors, or you’re getting other random glitches and errors, it may be because your server is running out of resources.
If you suspect your .htaccess file may be causing problems, log into your site via FTP and locate .htaccess in the root of your WordPress directory. Sometimes this file is hidden and you’ll have to select “show hidden files” in your FTP client settings to find it.
This is a very common problem and is usually caused by user error. If you’ve made manual edits to a WordPress theme, these edits will be overwritten when you update the theme.
Luckily this is a very easy fix. Go to Settings > Permalinks and choose a different permalink structure for your site. Save it and then select your original permalink structure and save again. This should reset your .htaccess file and get rid of the 404 errors.
Being locked out of your WordPress administration panel is a frustrating problem. This is often caused by a buggy plugin. Security plugins are particularly good at stopping you from getting into WordPress – if you get a message that your password is wrong but resetting it doesn’t work, this is probably due to an over-zealous security plugin.
If you’ve tried all the above steps and your site is still broken, it’s worth getting in touch with your host and explaining the problem you’re having. They may be able to fix it or offer some other suggestions of how you can fix it yourself.
If your site is really messed up and you’ve already tried everything you can think of to fix it, the final resort is to restore from a previously backed up and working version of your site.
If when you load your site you get nothing but a blank white screen with an error message that says something like
If you still have errors on your site then you’ll know .htaccess isn’t the problem and you can go ahead and rename it back to .htaccess again. If the problems have been sorted, generate a new .htaccess file by resetting your permalinks (just save a different permalink structure and then change it back and re-save).

6. 404 Error Pages

Most of the time this is caused by a plugin conflict, so try disabling your plugins one by one to see if you can fix the issue.
The recommended course of action to fix this problem is:

7. WordPress Syntax Error

Sometimes errors and glitches will just seem to happen randomly and you won’t have any idea what’s causing them.
This is only an option if you already made a backup, so make sure you backup your site regularly as you never know when you’ll need to recover your site.
Right-click on the uploads folder again. You now need to change the permissions of all the files to 644. Check the box to recurse into subdirectories again, but this time choose the “apply to files” only option.

Good Luck Fixing Your WordPress Site

There are several plugins that can handle backups easily for you and their use is highly recommended.
If you load your site and see nothing but a blank white screen, you’re experiencing the dreaded “white screen of death”.
Sometimes upgraded versions of themes can break your site. The easiest way to fix this is to downgrade to the version of the theme you were using before you came across the problem.

Posted by WordPress Guru