Why Is My WordPress Website Not Loading? Quick Fixes to 5 Common WordPress Errors

WordPress (WP) is a well-refined machine, so it’s uncommon that your WordPress website is down or unavailable. When it is, though, WordPress often doesn’t give an exact reason why.

So, here are five common WordPress errors and how to fix them when you’re tearing out your hair, asking yourself, “Why is my WordPress website not loading?”

Need help with your WordPress website that’s down? Let our WordPress website development company help. Head over to WebFX’s website maintenance services to get your site back up!

Contact Us Today!

First things first: Back up your WordPress site

Before trying to fix any error for your WordPress website, have a site backup.

Again, have a backup!

Losing files rarely happens, but when it does, it can mean lost hours, months, or even years of hard work.

With a backup, you have peace of mind that you can restore your site to how it was after a mishap. Plugins are the most common method of making a backup of your website. UpdraftPlus or BackupBuddy are WordPress plugins that allow for a secure backup.

Schedule backups for your WP site regularly, so you always have a current version available.

How to check if your WordPress site is unavailable

Check to see if your WordPress site is unavailable for everyone or not loading for just you.

Use WebsitePlanet to check.

If your site is down only for you, it will show that the website is still up. The error is on your end, and chances are you might want to check your connectivity or clear your cache.

Wordpress is up

If it’s down for everyone, that means that your site’s code or server is having an issue that makes your WordPress site unavailable.

Wordpress is down

If your WordPress website is not loading correctly, think about what happened right before the crash (WordPress update, plugin install, theme change, etc.). Figuring that out will give you insight into why the crash happened.

5 common causes of a WP site crash

There are many different reasons why your WordPress site could have crashed, but these are common ones worth checking.

1. Expired domain

Your domain expired. It happens when you purchase a domain (https://yourcompanyname.com), and for whatever reason, you didn’t renew it. It’s an easy fix. All you need to do is renew your domain annually.

2. Server

Your server crashed. With this, there’s often not much you can do except wait until it’s back up. You can also contact your server to let them know there’s a problem. If it’s an internal server error, we have a quick fix.

3. Host

Your web hosting service has issues, which might be on the host’s end or your end. Check with them to see which it is. It could be that your account is not set up correctly, or that your hosting service is down.

4. Broken code

Broken code is probably the most common reason why WordPress sites won’t load. It most often results in your WordPress website showing a blank domain page, also known as a white screen of death. Several factors can cause broken code, most of which involve plugins.

A few examples of how plugins break website code include:

  • Unfinished or incomplete auto-updates for your WP site or WP plugins
  • Incompatible plugins
  • Poor plugin or theme coding
  • Plugin or theme conflicts

5. Exhausted memory

When you install PHP, it comes with a limit on how much memory your site can use. Because PHP’s memory limit is much lower than the memory limit of your hosting provider, you may, at some point, need to increase that limit for your site to work again.

5 quick fixes for a WP site crash

If your WordPress site is unavailable, figure out what kind of error it is and check to see if you still have access to the WordPress Admin dashboard.

Alternatively, restore your site from the previous backup.

1. White screen of death

The white screen of death (WSoD) isn’t necessarily an error message. Instead, it’s when your WordPress site shows a blank domain page with no error or file path upon load, and it means that your website can’t be loaded correctly.

WSoD can happen on your entire website or only one or a few pages on your site, such as your WP Admin dashboard.

Quick fix: Rename files

To fix WSoD, you first need to find out what’s causing the problem, which means finding the exact folder where the issue exists that’s causing your WordPress website to show a blank page.

The way to do this is to rename folders in your site’s file manager. You can find the files on your web hosting account in the cPanel (which most hosting accounts have).

Start by following this file path:

Your web hosting account > cPanel > file manager > public.html > wp-content folder

In your wp-content folder, you’ll find folders that contain any content you have on your site. Start by renaming the folders and files within your wp-content folder one at a time. We recommend starting with the plugins folder, or the theme folder as updates to either often cause conflicts within your code.

After renaming one file (like changing the plugins folder name to plugins-disabled), refresh your site and see if the blank page still occurs. If it does, return the folder to its previous name, and move to the next folder.

If something does change when you reload your WordPress site, such as a partial page reload, that means the problem is somewhere in that folder.

Enter the folder and keep digging.

Rename the subfolders within that folder one-by-one until something changes again. The renamed file that causes the change will be the file that caused the crash. Renaming that file will cause your site to load properly.

Why it works:

When you rename a file, you are essentially disabling it, causing WordPress not to load it. WordPress will think the original file disappeared because there’s no longer a file with the same name. If the file is the only thing causing the problem, it should let your WordPress site load after the rename.

Renaming will get your site working again, but doesn’t troubleshoot the file containing the issue. To troubleshoot, you or someone else on your team can reprogram the file or reach out to a developer to inform them of the problem.

If the file is not essential to your site, you can also delete it, reinstall it, or check to see if there’s an update.

Bonus tip to save time:

A quicker, but more technical method is to turn on debugging mode, which helps you find the file path to the issue causing the WSoD faster than individually renaming each file.

To turn on debugging mode, follow this file path:

Your web hosting account > cPanel > file manager > public.html > wp-config.php

You’ll need to open the wp-config.php file in edit mode.

Scroll down to the bottom of the page and find this line of code (you can use the hotkey Ctrl/Command-F to find it too):

  • define( ’WP_DEBUG’, false );

Change the code to:

  • define( ’WP_DEBUG’, true );

Doing this will turn on debugging mode.

Changing to debugging mode will show error messages that include file paths when your page reloads. You can then find the file containing the blank screen using the file path and rename it to disable it, which should get your site working again.

You’ll want to change the code back to “false” after you finish debugging.

2. Error establishing a database connection

If you can’t connect to your WordPress site’s database, you could be having this error, which often means your database has been corrupted, and that there’s a problem with your wp-config.php file.

Follow this file path and open up the wp-config.php in edit mode:

Your web hosting account > cPanel > file manager > public.html > wp-config.php

Quick fix: Repair your database

First, check that the hostname, username, password, and database name in the file are correct by accessing your phpMyAdmin and comparing them. Correcting those details should fix the issue.

If it doesn’t, you can turn on WP’s automatic database repair support tool by adding this line of code to your wp-config.php file:

  • define( ‘WP_ALLOW_REPAIR’, true );

Save the file. You can find database repair script at: https://yoursiteurl.com/wp-admin/maint/repair.php

The page that loads will give you two options:

  • Repair database
  • Repair and optimize database

Either will run the repair tool, so choose the one that best suits your needs. The repair tool should fix the error in your database. After your WP site loads properly, remove the allow repair code you added to your wp-config.php file.

3. Memory exhaustion error

If you see an error message like: “Fatal error: Allowed memory size of 1717866 bytes exhausted” or some other number, it means you have exhausted your site’s memory.

Before attempting to increase your site’s PHP memory limit, take a look at the files you have on your website. If your site contains content that takes up a lot of memory (such as plugins or themes), then deleting or using lightweight or compressed versions of those files will free up more memory.

Quick fix: Increase PHP memory

Increasing your PHP can involve creating a php.ini file.

If you don’t have one, you can reach out to your web hosting provider for help setting one up.

If you already have one, check to see your memory limit.

If the line of code is not there, you can add it. It looks like this: memory_limit = 64M

If it’s small like 64m, you can double that number to 120m or, if need be, to 256m. Kill off any PHP processes and confirm the changes you’ve made, then refresh your page and see if the error persists.

With WordPress, you may need to add another line of code to your wp-config.php file, which WordPress sometimes uses to override your php.ini file.

Open up the cPanel on your web hosting account and find your wp-config.php file:

Your web hosting account > cPanel > file manager > public.html > wp-config.php

Click to edit, and then copy and paste this code before the line that says, ‘That’s all, stop editing! Happy blogging.

  • define( ‘WP_MEMORY_LIMIT’, ‘256M’ );

If this code doesn’t allow your page to load properly, it could be that you’ve hit the memory limit of your web hosting service provider, and you may need to upgrade your hosting service plan.

4. Internal server error

Internal server errors mostly have two causes:

  • Exhausted memory limit
  • .htaccess file problem

If the problem is with the memory limit, you can fix it by increasing your PHP in the way we outlined in the memory exhaustion error section above.

You can check if it’s the second cause by finding your .htaccess file in your cPanel using this file path:

Your web hosting account > cPanel > file manager > public.html > .htaccess

After you find the file, rename it and refresh your page.

If your page works, you have a problem with your .htaccess file, and you’ll need to generate a new one.

Quick fix: Generate new .htaccess file

You can generate a new .htaccess file by going to your WP Admin dashboard and locating the Permalinks tab within your settings.

You don’t need to change anything on the Permalinks tab.

Generating a new .htaccess file is as simple as hitting save changes.

If that doesn’t fix your site, you’ve likely reached your site’s PHP memory limit and need to increase it.

5. HTTP 404 error

When you get a 404 error, it almost always means that the server couldn’t find your WordPress page.

HTTP 404 errors can happen whenever there’s a broken link or a change in a URL. If it happens with a page that is usually available, then it’s generally because of an issue with your .htaccess file, much like with the internal server error.

Quick fix: Upload a new .htaccess file

First, try generating a new .htaccess file.

If this doesn’t work, try creating a new file and naming it: .htaccess (there’s a period before it, and no file extension).

In the new file, add this code:

HTTP 404 error code

Upload the new .htaccess file to your public_html folder:

Your web hosting account > cPanel > file manager > public.html

This should fix the HTTP 404 error.

WebFX can help you manage your WordPress website!

Tired of all the hassle that comes with setting up or maintaining a WordPress website?

Check out our WordPress web design services and website maintenance services!

With over 25 years as a full-service digital marketing and web design company, we’ll build you the perfect WP site, and we’ll be around to help you solve any of your problems.

Contact us online or call us at 888-601-5359 to learn more!