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.
Wrap Up
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.
[leadplayer_vid id=”50753A7F726BC”]
10 thoughts on “When Themes Go Rogue”
Thanks!! Panic was just setting in!
Wow this saved me bigtime. Couldn’t get into wp-admin and was having a “moment”.
Thanks!
Glad to have helped
Thank you so much for this. I panicked at first because I could not change the permissions via FTP, they just reverted back to what they were before. However, I tried it using the File Manager in my Hosting Account and that worked just fine. Thanks
thank you very much 🙂 . actually i was thinking if deleting the theme would fix the problem or not but you made it clear that i can goahead with that idea . thank you once again . superb tip ……… hats off 🙂
THANK YOU!!!! This helped me out so much. Now, how do I get my media/picture files to show up again? They are still in the wp-content/uploads folder but not showing up in my media library (the link is, but not the pic) nor in any of the pages/posts.
Again, thank you.
You’ve just saved my life. Thanks a TON !! ^_^
THANK YOU…THANK YOU…THANK YOU! I about fell out of my chair when my WP site went blank. AWESOME tip.
Again…THANK YOU!
This is a quick, simple fix and I can’t thank you enough – this saved me BIG TIME!!!
Saved my butt!! RAWK!
Comments are closed.