Easy Way To Fix a Broken WordPress Site

Broken WordPress website. Sounds bad?

It does and it is.

A broken WordPress website leaves you with a blank white screen, often known as White Screen of Death when you try to reach it.

What’s worst is in most cases, you don’t see any error or don’t know what caused the issue.

But you still need to fix it.

And in this post, I’ll tell you what you can do to fix a broken WordPress website. So let’s cut to the chase.

What Breaks A WordPress Website

Before fixing, you better know what breaks a WordPress website. So here are some of the reasons that cause a broken WordPress website.

Let’s clear the basics:

Any Custom Code in Your PHP Theme/Plugin Files

I can understand the zeal of tweaking code(I was a developer too). But the changes you make in a code don’t execute successfully every time. And you know in PHP, a missing semicolon can lead to an error. And if you’ve made changes in any of your PHP theme or plugin file, and you’ve not written it right, you may encounter errors. Sometimes, this error could result in a broken website too. So while adding custom code to your theme or plugin files, make sure to write them properly. If you’re not adept with coding, connect with a developer who can do it for you.

Poorly Written Plugin

55.9% of the WordPress vulnerabilities come from plugins, according to Wordfence. WordPress has 58,292 plugins to date. But you’ve no idea how many poorly coded plugins are there. Installing them on your website can have multiple consequences. It can not only break your WordPress website but also cause issues like 500 Internal Server Error, Connection Timed Out, 403 Error, and more. And if you’re using any third-party plugins, even an update can break your WordPress website. Sometimes a new update brings some bugs with it. These bugs can conflict with your website which can eventually break it sometimes.

Outdated Themes

This is a no-brainer. Using an outdated version of your WordPress theme can leave your WordPress website broken. Hence I would suggest you keep your themes updated. However, sometimes even updating them can break down things(just like plugins). Yes, you heard it right! But the idea is, you always need to keep a check on your themes.

Using Older PHP Version

Only 0.3% of websites are using PHP 8, the latest version launched on 26 Nov 2020. This could be another reason behind a broken WordPress website. For example, you or your host is using PHP 7. And you receive a WordPress update where PHP 8 is the minimum requirement. And if you update your WordPress version, the functions that are written for PHP 8 won’t work properly. As a result, when these functions load, it may break your WordPress website.

PHP Memory Exhausted

Sometimes PHP scripts consume too much memory that they exhaust your PHP memory limit. This can also break your WordPress website in many cases. In such cases, you’ll need to increase your PHP memory limit to fix a broken WordPress website. You get a 64MB memory limit by default, but you can increase it as per your requirements. I’d recommend you set it to either 128MB or 256MB. However, 256MB is more than enough and works fine in most cases. You can do it by editing your wp-config.php file. Just paste the code written below prior to, “That’s all, stop editing!” line, and your limit will be increased. define( ‘WP_MEMORY_LIMIT’, ‘256M’ );

Tips to Fix a Broken WordPress Website

So those were some of the reasons which break a WordPress website. Now let’s come to the point on how to tackle them. Or tips to fix broken WordPress website.

Check If It’s down for You or All

First, you need to check whether your WordPress website is down for all or only you. Here are some tools you can use to do this:

StatusCake.com

I’d say, this is the best option to track if your website is down for all or not. It lets you perform multiple tests like HTTP, TCP, DNS, SMTP, etc. All you need is to create an account on it, add your website URL, select the test type, and hit enter. You will see if your website is down or not.

Downforeveryoneorjustme.com

Another good option is Downforeveryoneorjustme.com. A tongue twister. But you still get a super easy interface where you just add the URL, submit it and you’ll see if the website is down or not.

Isitdownrightnow.com

If you don’t want to use the above two websites, you can try isitdownrightnow.com. It offers a simple interface where you can enter the URL of your website to get Response Time, Last Down, Website Status History of your website.

Down.com

If you don’t want to see results for some insignificant factors but if your website is down or not right away, try down.com. Enter your website URL and you will get the result if it is down or not.

Now you know how to check if your WordPress website is down. But what if it is really down for all.

Well in such cases, you can check if your domain has expired, the server is down, have any unfinished plugin/theme updates, or your website is hacked. But why wait for that moment. Preventing it in the first place would keep it safe from all these things.

Figure out the Error

Sometimes when your WordPress website breaks, you get to see a blank screen on your browser. In common language, we call it the White screen of death.

In this case, you don’t get a clear idea of what’s breaking your website. And if you don’t know the problem, how would you fix it? For such cases, WordPress has an apt solution. Let’s talk about what it is:

Enable WP_Debug On Your Website

WordPress has a feature called WP_DEBUG. It is basically a permanent global variable that lets you enable the debugging mode on your WordPress website.

You will need to update this in your wp-config.php file. And once you do that, you will start seeing the error on the blank white screen if you’re lucky.

Let’s talk about how you can enable the debugging mode with wp-debug:

  1. Access your wp-config.php file. You can either do it through cPanel or with FTP/SFTP details.
  2. Once you access the file, open it and search wp_debug.
  3. You may find something like define( ‘WP_DEBUG’, false );
  4. Edit it and change it to define( ‘WP_DEBUG’, true );
  5. If you don’t find this code snippet, you can simply write it down before, “That’s all, stop editing!” line.
  6. Once you set wp_debug to True, you can save the file.
  7. After that, go to your browser, refresh the page.
  8. You may see the exact error that is breaking your WordPress website.
  9. And if you see, fix that.
Posted in Windows Hosting.