How To Fix A Broken WordPress Theme?

WordPress community provides several good free themes which we can install easily from the WordPress theme library. If any of your WordPress themes is installed but it is broken, then you can edit that theme manually or you should try to reinstall the theme again and then your theme will work properly.

When there are some problems in your theme or something is broken within your theme, you may see an incorrect and incomplete layout when you will try to access your blog. The main issue which you will find is PHP errors in your blog, which shows the broken code of your theme. If you have changed the code of your WordPress theme, then you should back up your WordPress theme before moving on to troubleshooting or you should reinstall the theme completely.

Backing up Theme files of WordPress

If you want to back up your theme, then you need an FTP client with an FTP account login information. After logging in to the client, navigate to wp-content/themes on your host website. There comes a folder containing all the themes which you had installed for your site. Troubleshoot the theme which is broken or showing some errors and transfer it to a folder on your computer in order to create a backup.

Editing code of the broken file

If you can troubleshoot the theme easily, then you can edit the theme files directly from the dashboard of WordPress. Login to WordPress and navigate to Appearance > Editor. Select the theme file which is broken. Now change and edit the code in the text box. After completing the changes to the code of your theme in the text box, make sure that you save it and now reload your WordPress site. You can see after repairing the code of the theme file your site will start running normally with no errors as the site code has been corrected with no error and your blog pages will correctly work.

Reinstalling WordPress theme

If you are not comfortable coding and the theme is reporting PHP errors, then there is another option which is very easy and will really help you fix your broken site. This method suggests that you should reinstall the theme and return it to the default coding process. After that, move on to the dashboard of your WordPress site and navigate to Appearance > Themes. From the theme menu, activate a temporary theme for your blog site and you know as it is temporary, it will be on your site for the time until you fix the issue of your broken theme. Click "delete" and delete the theme which was broken and shows errors and removes all the files of that theme. When the issue will be resolved change, this temporary theme back to the original theme which was applied before the errors. After this how to install the theme which we deleted is an issue, so don't worry it is an easy step just click "Install Themes" from the top of the page, search for the name which you uninstalled due to the broken issues of them and try to reinstall the theme from the WordPress library to reset the temporary theme. Activate the theme and you see that your broken theme has been resolved and your site pages are working well.

So these are some steps which you can use and implement to fix the broken theme of WordPress and reinstalling the theme is one of the easiest ways, so you should opt for that step.

Thanks for reading. Hope you liked it. Next one coming soon.

Get the latest episodes directly in your inbox