When Themes Go Rogue
An imaginary person, not me honest, was working on a WordPress site. This person (who is very charming and handsome BTW) made a change to the code in the theme, coded the change incorrectly and brough the site crashing down, I just thought I would share with you a quick way to work around a problem with my how to on disabling a WordPress theme manually.
Does This Sound Familiar?
Here’s the scenario, you have added some code to the theme files, the code is incorrect, and an error is thrown, it then gets worse, as the same error is thrown as you attempt to get back into your dashboard to fix the error. How are you going to get around this?
Here is My Quick Fix
A very quick fix to get your site back up and running is to delete the theme.
When you delete your theme, WordPress does a double takes realises that the files aren’t there and begins to work without a theme, your site’s front end will throw a white screen, but no error message, and best of all you can now access your back end.
You can then go in an activate a default theme or fix any error you may have inadvertently introduced.
Fool It Into Thinking The Theme is Not There
You probably don’t want to delete your theme is you are working on it, so a little cheat is to make the theme disappear by changing the file permissions.
Using your ftp client of choice, connect to your site and browse to wp-content/themes and change the files permissions of your chosen theme directory to 000. This prevents WordPress from access this directory and makes it think the active theme is not available, again the system will be back with a blank front end.
Remember to change the permissions back so you can work on the files.
Hope this little nugget helps someone in the same predicament.
UPDATE: WordPress TroubleShooting Training
I have recorded a video training session on troubleshooting WordPress for my WordPress training and support community the WP Owners Club.