0

I just created and activated a child theme and now I'm getting the HTTP ERROR 500. I've deleted the child theme through FTP and still getting the error.

Also tried changing wp-content/themes to wp-content/themestemp and that allows me to get back into the wp-admin panel but when I'm trying to install a new theme Wordpress can't create a new directory for the themes.

Is there a way to recover the primary theme?

Thanks in advance!

closed as off-topic by Jacob Peattie, Max Yudin, Howdy_McGee Feb 22 at 5:55

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions that are too localized (such as syntax errors, code with restricted access, hacked sites, hosting or support issues) are not in scope. See how do I ask a good question?" – Jacob Peattie, Max Yudin, Howdy_McGee
If this question can be reworded to fit the rules in the help center, please edit the question.

  • Check /wp-content permissions. – Max Yudin Feb 20 at 10:22
  • Thanks @MaxYudin. I've set all rights to read, write and execute but still getting the error. Is there an option to change the active theme through phpMyAdmin or ftp? – Tim van Oost Feb 20 at 10:31
0

In general a 500 Server Error can be solved (or at least be correctly identified) by looking at php logs. If you are on a shared hosting you should have something in your hosting's control panel to check the logs (look for Error messages), if you are self-hosting on your own vps you can usually find the logs in the /var/log directory.

This said, the current theme in WP is stored as two entries in wp_options, which are template and stylesheet. Name back the theme directory like the original one, write down the directory name of the original theme, and put it as the field value for wp_options.template and wp_options.stylesheet. At this point Wordpress is, if you haven't touched anything, be in the same state as before you child-theme'd.

Refer to the first paragraph of my answer and edit the answer with the php error so we can look at it.

  • Big thanks Fabrizio! As it turned out 'template' was referring to the original theme and 'stylesheet' was referring to the child-theme. I've changed 'stylesheet' to the original theme and it's working like a charm again. – Tim van Oost Feb 20 at 10:54

Not the answer you're looking for? Browse other questions tagged or ask your own question.