WordPress troubleshooting with cPanel

Don’t hit the panic button

It’s happened to most of us: You implement a nice new tweak to spiff up your WordPress website, refresh the page to view the update, then whammo, your site comes crashing down and you’re frantically searching for WordPress troubleshooting tips. Perhaps you’re the unlucky recipient of the infamous White Screen of Death (WSOD), or maybe you’ve earned the not terribly helpful “Internal Server Error” message. Whatever it is, don’t panic — chances are this is something you can fix with a little tinkering.

A little WordPress troubleshooting knowledge goes a long way.

 

In this article, you’ll learn about the most common WordPress errors and how to fix them using cPanel.

Enable debugging in WordPress

Enabling debugging in WordPress causes detailed debugging messages to appear on your site, which can help with troubleshooting and pinpointing errors.

To enable debugging via cPanel, follow these steps:

  1. Log into cPanel.
  2. Click on the File Manager.
  3. Navigate to your website’s home folder.
  4. Select the wp-config.php file and click Edit.
  5. Look for the line define( ‘WP_DEBUG’, false );
  6. Change it to define( ‘WP_DEBUG’, true );
  7. Save your changes.
  8. Use your browser to reload your website.

Debugging messages should now be visible on your site. Keep in mind that not all debugging messages are equal. There’s a difference between an error message and a warning message, for example. You can learn more about debugging in WordPress in the official WordPress Codex article.

Related: 25 bug tracking tools for websites

White Screen of Death (WSOD)

If your website disappears and a blank white screen takes its place, you’re face to face with the White Screen of Death. Despite the terrifying name, all it really means is that there’s a PHP or database error interfering with WordPress displaying your site. It might be due to a new theme or plugin, or an update gone awry. Solutions to all of these are listed below. Think about changes you’ve recently made to the site, as that will point you toward the most likely culprit.

Related: How to update WordPress like a pro

WordPress plugin problems

WSOD can result from plugin conflicts. If you can log into your Admin screen, try deactivating all plugins. If your site reappears, turn them back on one at a time to pinpoint the offender.

If you can’t use your admin screens, you can disable plugins via cPanel using the following steps:

  1. Log into cPanel.
  2. Click on the File Manager.
  3. Navigate to your website’s home folder and then to /wp-content/
  4. Rename the subfolder “/plugins/” to “/plugins-disabled/”
  5. Clear your browser cache and go back to your website.

If you can view your Admin screen, then the WSOD was likely caused by a plugin.

To figure out which plugin is causing the issue:

  1. In cPanel File Manager, in the /wp-content/ folder, create a new “/plugins/” folder.
  2. Move individual plugins from the “/plugins-disabled/” folder to “/plugins/”
  3. Use your browser to reload the Admin screen.

The only active plugins will be whichever ones are in the “plugins” folder. If the WSOD reappears, you’ll be able to pinpoint the culprit.

Alternatively, you can disable each plugin individually:

  1. Log into cPanel.
  2. Click on the File Manager.
  3. Navigate to your website’s home folder, then to /wp-content/plugins/
  4. Append “-disabled” to the folder of any plugin you’d like to disable.
  5. Use your browser to reload the Admin screen. The plugin is now disabled.

For example, if you wanted to disable Akismet, you’d take the original folder name:

/wp-content/plugins/akismet/

And rename it to:

/wp-content/plugins/akismet-disabled/

WordPress theme problems

If you’ve renamed the plugin directory without success or have made a recent theme update, the WSOD might be due to a theme problem.

The process for fixing this is similar to the process for finding a rogue plugin:

  1. Log into cPanel.
  2. Click on the File Manager.
  3. Navigate to your website’s home folder and then to wp-content
  4. Rename the subfolder “themes” to “themes-disabled”
  5. Clear your browser cache and go back to your website. If you can view your Admin screen, then the WSOD was likely caused by installation of a new theme or a theme update. Use a different theme until you’re able to resolve the problem.

Related: How to install a WordPress theme

Bad .htaccess File

If the WSOD persists after taking the above steps for plugins and theme problems, you might have issues with the .htaccess file related to your site. To test this, take the following steps:

  1. Log into cPanel.
  2. Click on the File Manager.
  3. Navigate to your website’s home folder.
  4. Rename the file “.htaccess” to “.htaccess-old”

Note that in some versions of File Manager, you’ll need to click on the File Manager Settings button and enable the “Show hidden files” option or you won’t be able to see this file.

5. Clear your browser cache and go back to your website. If the WSOD is gone, then you’re dealing with an issue related to a change in your .htaccess file. If you have a backup, restore it. Otherwise, you can use the standard WP .htaccess file as described at https://codex.wordpress.org/htaccess. Alternatively, now that your admin screen is back, you can also navigate to Settings >> Permalinks and click on the Save Changes button. WordPress will create a new .htaccess file in your site’s root directory.

Related: How to back up a WordPress site

Internal Server Error

The dreaded “500 Internal Error” message is about as helpful as an umbrella in a hurricane. It basically means that there’s something wrong, but the server is unable to determine what it is.

The most common causes of this error on a WordPress site are a corrupted .htaccess file or problems with the PHP memory limit.

 

The first troubleshooting step is to rename the .htaccess file as described above. If that doesn’t fix the problem, then you might have a problem with the PHP memory limit. Follow the instructions in the next section, Increase PHP Memory Limit. If neither of these resolves the issue, then the problem may be due to a plugin or theme malfunction. Follow the steps for WordPress Plugin Problems and WordPress Theme Problems.

Increase PHP memory limit

It’s not uncommon for a WordPress installation to run into memory problems. You might receive a vague “internal server error” message or, if you’re lucky, the more descriptive: “Fatal error: Allowed memory size exhausted.” Fortunately, you can increase the PHP memory limit to make this error go away. To do this via cPanel:

  1. Log into cPanel.
  2. Click on the File Manager.
  3. Navigate to your website’s home folder.
  4. Select the wp-config.php file and click Edit.
  5. Look for the line that says: /* That’s all, stop editing! Happy blogging. */ and paste this just before it: define( ‘WP_MEMORY_LIMIT’, ‘256M’ );
  6. Save your changes. When you revisit your website the error should be gone.

It’s important to note that, even if you’ve made this error go away by increasing the memory limit, you might still have a problem. Something is gobbling up memory, perhaps a recently installed plugin or a theme function. If you know how to check your server logs, you may be able to identify the culprit there.

Increase WordPress file upload size

If you’re trying to upload a large file, you might run into to the “Exceeds maximum upload size for this site” message. The default file size is often set low to keep people from uploading huge videos and massive files to your server. If the limit is getting in your way, it’s possible to change it by configuring some server settings. If you’re using cPanel, making the changes is easy:

  1. Log into cPanel.
  2. Scroll down to the Software section and click Select PHP version.

WordPress Troubleshooting Software

3. Click the link to Switch to PHP Options.

WordPress Troubleshooting Select

4. On the Options screen, you’ll need to modify three settings:

  • post_max_size
  • upload_max_filesize
  • memory_limit

These three settings are all related. To upload large files, post_max_size must be larger than upload_max_filesize. It is also recommended that memory_limit be set larger than post_max_size.

WordPress Troubleshooting PHP Versions

5. Save your changes and you should now be able to upload your large file. You could also implement these settings via creating or editing a php.ini file; however, doing it through cPanel is easier.

Related: How to enable Gzip compression for a WordPress website

Conclusion

WordPress is simple when everything goes smoothly, but when something goes awry, your entire site may go down with a bang.

Following the above WordPress troubleshooting steps will enable you to resolve most problems yourself. If you’re still stuck, contact your hosting provider’s technical support department. For GoDaddy customers, help is available 24/7.