Troubleshooting Common WordPress Website Issues for Business Owners

BY IN News, 11.10.2023

wordpress issues

WordPress is an excellent platform to run your website. It’s dependable, versatile, and easy to use. However, like anything else, you may encounter occasional issues. While they might appear daunting, most of these can be resolved with just a few straightforward steps. It’s essential to know how to troubleshoot and resolve them swiftly to ensure your website performs without any glitches. 

Let’s explore common WordPress website issues and their solutions to help you get back on track when such scenarios occur.

1. Error establishing a database connection

Error establishing a database connection

Root causes

Wrong login credentials: Your WordPress database has its login information, different from your hosting account. If you update your database’s username or password, the old information stored in WordPress won’t work.

Corrupted database: Problems like plugin issues or incompatible themes can mess up your database tables or delete data.

Irresponsive database server: Sometimes, the issue is on your web hosting side. Instances like sudden traffic surges or permission problems can make your database stop working. This usually occurs in shared hosting where many sites share resources.

Corrupted core files: WordPress core files control how your site functions. Corrupted files can result from bad plugins, themes, or errors when transferring files via FTP. Incorrect changes to core files can also lead to database errors.

How to troubleshoot

Depending on the specific cause of the error, there are multiple ways to troubleshoot. 

1. Check WordPress database credentials

Check if the database name, host, username, and password are correct. Edit the wp-confiq.php file if the information is not correct. 

2. Fix corrupted WordPress files

Follow these steps to fix the error caused by corrupted WordPress files.

  1. Download the latest WordPress version from wordpress.org.
  2. Unzip the downloaded file and remove the ‘wp-content’ folder and ‘wp-config-sample.php’ file.
  3. Use SFTP to upload the remaining files to your site, replacing the existing ones. This will replace the problematic files with fresh, clean copies.
  4. Once done, it’s recommended to clear your browser’s cache.

3. Repair database

A corrupted database can also be the reason behind this issue. WordPress has an in-build ‘repair database’ and ‘repair and optimize database’ option, which can be used when you encounter error messages along the lines of 

  • The database may need to be repaired.
  • One or more database tables are unavailable. The database may need to be repaired.

To access these features, you need to edit the wp-config.php file and add the following code at the end of the file.

define(‘WP_ALLOW_REPAIR’, true);

Repair database

After running the database repair as mentioned above, make sure to remove the added code line in your wp-config.php file. This step is crucial to prevent unauthorized access, as the repair page can be accessed by anyone without logging in.

4. Check if your WordPress database server is down

When the maximum number of clients connected at a certain time reaches a threshold capacity, it might fail to handle more connections. If you have multiple websites on the same server, you can visit those sites to see if their SQL servers are also down. If this is the case, contact your hosting provider immediately and check if your MySQL server is responsive.

2. 404 error

Error message: 404 Not Found

There might be other variations of this error message, but all of them mean the same:

  • HTTP Error 404
  • Page Not Found
  • The requested URL was not found on this server
  • The page cannot be found
  • We can’t find the page you’re looking for
404 error

Root causes

  • You’ve recently moved your site to a new hosting provider.
  • You’ve changed the structure of your website’s URLs (permalinks) without redirecting the old ones.
  • There are issues with the file permission settings.
  • An incorrect URL is entered.
  • You’re using an outdated and poorly coded plugin or theme.

How to troubleshoot

  1. Clear browser caches & cookies
  2. Set up permalink

If you encounter sitewide 404 errors when attempting to access content, the most probable cause is a problem with your website’s permalinks. Follow the steps to set up the permalink: 

  1. Log in to your WordPress dashboard.
  2. Go to Settings → Permalinks.
  3. Select the Default settings.
  4. Click the Save Changes button.
  5. Restore the settings to their previous configuration, which you had selected before the default option. If you have a custom structure in place, reinstate it.
  6. Click Save Settings.

3. White screen of death

White screen of death

Root causes

There are 2 major reasons why the white screen of death occurs.

  1. PHP errors: The most common cause is a PHP error. If there’s a syntax error or a fatal error in one of your theme or plugin files, it can lead to a white screen.
  2. Memory exhaustion: WordPress requires a certain amount of memory to function properly. If a script or a process uses up more memory than it’s allowed to, it can result in a white screen.
  3. Faulty theme/plugin: Another possible cause is poorly coded/incompatible themes or plugin conflicts.

How to troubleshoot

1. Clear browser cache

It is the quickest fix and often resolves most White Screen of Death (WSOD) issues.

2. Increase memory limit

If clearing the cache doesn’t work,

  • Log in to your server using SFTP
  • Open the public_html folder and choose the view/edit option
  • Paste the code: define(‘WP_MEMORY_LIMIT’, ’64M’);

3. Set the default WordPress theme

Sometimes themes don’t install correctly due to corrupted files. It can be fixed by activating default themes.

  • Go to the WordPress dashboard.
  • Click on ‘Appearance’ and navigate to ‘Themes.’
  • Activate one of the default themes (Twenty Nineteen, Twenty Twenty, Twenty Twenty-One).

4. Disable all plugins

If the above steps don’t work, you can try disabling plugins one by one. If the issue is resolved after disabling a particular plugin, that plugin may be corrupted and responsible for causing the White Screen of Death.

4. Bad Gateway or Gateway timeout error

Error message: 502 bad Gateway

Root causes

Server overload or timeout: This is one of the most common causes. If a server is receiving too many requests and is unable to handle them all in a timely manner, it may return a 502 error.

Problems with proxy servers: If there are one or more proxy servers (reverse proxy, load balancer, etc.) in the network path, and one of them encounters an issue communicating with the upstream server, it can result in a 502 error.

How to troubleshoot

Even though this issue usually stems from problems with your hosting provider’s servers rather than your website itself, there are steps you can still take to try and resolve the issue.

Step 1: Refresh the website (CTRL + F5) to rule out a temporary connection problem.

Step 2: Confirm that your website is working correctly. You can often access it through an internal URL provided by your web host.

Step 3: Clear your browser’s cache to ensure it’s not causing the problem.

Step 4: Visit the CDN or firewall provider’s website, or check your web host’s site for any announcements regarding outages or technical issues.

Step 5: If you don’t find any obvious issues, contact all your service providers to determine who might be causing the problem.

5. WordPress stuck in maintenance mode after an upgrade

Error message: ‘Briefly unavailable for scheduled maintenance. Please check back in a minute.’ 

Root cause

This occurs because WordPress activates its built-in maintenance mode whenever it updates a plugin or theme, creating a .maintenance file in the process. Normally, the maintenance mode should only last a moment, but it can get prolonged due to a few reasons:

  • Closing your browser during an auto-update
  • Attempting to update a large number of plugins or themes simultaneously
  • Compatibility issues with a theme or plugin

How to troubleshoot

To fix this problem, you’ll need to delete the .maintenance file. Here’s how:

  • Log in using an FTP client to access your server
  • Find the .maintenance file in the root folder
  • Delete the .maintenance file

Conclusion

The above solutions work for most of the common WordPress website issues. But, for more intricate challenges commonly experienced by business websites – such as performance optimization, eCommerce functionality, security, and custom integrations — it’s essential to have a deeper understanding of WordPress, coding expertise, and a tailored approach. For such scenarios, it is advisable to hire WordPress developers who can immediately fix the issues and ensure seamless functioning of your website without any interruptions.

ABOUT THE AUTHOR

Amelia Swank

Amelia Swank is a senior web and app developer with over 8 years of experience. Currently with SunTec India, she specializes in the domain of digital solutions, specifically WordPress development, Shopify development, Magento development. Her passion for technology fuels her writing, aimed at spreading insights to all. Amelia closely follows the latest IT advances to share her expertise with those interested in the field.