php - HTTP ERROR 500 after installing child-theme [Wordpress]

admin2025-06-03  2

Closed. This question is off-topic. It is not currently accepting answers.

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?

Closed 6 years ago.

Improve this question

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. This question is off-topic. It is not currently accepting answers.

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?

Closed 6 years ago.

Improve this question

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!

Share Improve this question edited Feb 20, 2019 at 12:18 Fabrizio Mele 6875 silver badges16 bronze badges asked Feb 20, 2019 at 10:05 Tim van OostTim van Oost 32 bronze badges 2
  • Check /wp-content permissions. – Max Yudin Commented Feb 20, 2019 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 Commented Feb 20, 2019 at 10:31
Add a comment  | 

1 Answer 1

Reset to default 1

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.

转载请注明原文地址:http://conceptsofalgorithm.com/Algorithm/1748885263a314531.html

最新回复(0)