• Hi All,

    I have been using F8 Lite theme and created a child theme with the simple Style.css as follows:

    /* CSS Document */
    
    /*
    Theme Name: f8-lite-child
    Description: A Child Theme of f8-lite
    Template: f8-lite
    */
    @import url(../f8-lite/style.css);

    I made a mistake on the last line where the reference to the parent theme style.css has been missing the start and end code. I activated the child theme without noticing the mistake I have made. Then when I access my blog and wp-admin I got the 500 (internal server error). I get back to check and found the mistake and I changes the last line to :

    @import url("../f8-lite/style.css");

    too bad the 500 internal server error persist.
    Is there anyway I could get over the problem ?

    here is my blog https://www.bingkai.com.au/
    currently are to the root directory.

Viewing 10 replies - 1 through 10 (of 10 total)
  • Those 500 errors are usually due to something wrong/lacking in an .htaccess file or a server configuration problem elsewhere. Could there be any .htaccess files in the folder for the parent theme that are missing in the child theme? I don’t see how the mistake you made in the child theme could generate a 500 error, though the “@” you have prefaced the import with will suppress any PHP errors.

    One thing you might try is to temporarily remove the “@” to see if you get a PHP error that helps you troubleshoot. So your child theme import would look like:
    import url("../f8-lite/style.css");

    You could also try copying and pasting the CSS (not the Theme Name, Description, or Template lines) from the f8-lite/style.css straight into your child theme’s style.css instead of importing it and see if that clears the error.

    Thread Starter chingteoh

    (@chingteoh)

    Thank you so much for your reply.

    I will try to copy and paste the CSS from parents to child theme CSS and see if it works.

    Meanwhile, I contacted the hosting provider and they send me the error log file from the server side, it is :

    [15-Dec-2012 13:12:59 UTC] PHP Warning: require_once(/home/chingteo/public_html/bingkai.com.au/blog/wp-content/themes/f8-lite-child/theme-options.php) [<a href='function.require-once'>function.require-once</a>]: failed to open stream: No such file or directory in /home/chingteo/public_html/bingkai.com.au/blog/wp-content/themes/f8-lite/functions.php on line 4

    Any idea on this error log?

    That could be your problem right there. The server is telling you that it’s looking for a file called theme-options.php in the following directory:
    /home/chingteo/public_html/bingkai.com.au/blog/wp-content/themes/f8-lite-child/
    and it apparently doesn’t exist. That makes me think the f8-lite theme doesn’t take well to acting as a parent theme.

    I’d try copying the file theme-options.php from /f8-lite to f8-lite-child to see if that fixes the error, but there may be others that show up once that’s fixed.

    Will your web host allow you access to the error logs directly? You’re going to need them to debug/maintain such a site.

    Thread Starter chingteoh

    (@chingteoh)

    Thanks for getting back to me so quick.

    I have tried to copy the theme-options.php to f8-lite-child. but the problem still persist.

    Also, I follow your advice to rename .htaccess it also couldn’t manage to solve the problem.

    And, I tried copying the parent theme CSS into the child theme CSS (the part without the name description) too, doesn’t help.

    too bad, my web host doesn’t allow me to access the logs directly. Will contact them again on this.

    By the way, is there any way I could activate the parent theme? since I hasn’t done much with any changes in the child theme. But the problem is I currently do not have access to wp-admin. How can I re-activate the parent theme?

    You’re welcome. I know how frustrating this can be, especially when your host makes it hard to figure out what’s going wrong.

    Does your directory structure actually look like this:
    /home/chingteo/public_html/bingkai.com.au/blog/wp-content/themes/f8-lite-child/theme-options.php
    with your blog in a folder called bingkai.com.au?

    It seems like it should be like this:
    /home/chingteo/public_html/blog/wp-content/themes/f8-lite-child/theme-options.php
    if your domain is bingkai.com.au.

    If I have that correct, what you would need to do is change all references to that incorrect path to eliminate the domain name from the path.

    Thread Starter chingteoh

    (@chingteoh)

    Thanks linux4me2 for all your help and advice. That really helps a lot and good to have you around.

    the web host just get back to me and they seem to help repair the database and it solved the problem now.

    It is now revert to f8-lite.

    Many thanks linux4me2! you are legend!

    I’m glad you got it working.

    Thread Starter chingteoh

    (@chingteoh)

    Thank you so much linux4me2
    You are so kind..

    Yes, it finally works. but still on the parent theme f8-lite.

    I may not dare to touch the child theme again.. pheww…

    I don’t think it’s anything you did, actually. It sounds like it might have been an issue with the web host. Maybe give it a day or so and if it’s still working okay you could try again.

    I know that this is from a few months ago, but thought it would be worth sharing how I solved the same problem in case you haven’t come across it:

    how to change wordpress themes directly from the database

    The above link is what I used to change the 3 DB fields they mention back to the parent theme. When I did this I was able to get back into my website and its admin

    One of my 3 fields was the child theme while the other 2 where the parent theme. When I switched the child to be the parent all was well

    Hope this puts you in a position to more confidently mess with child themes!

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘500 (Internal Server Error) after Activating Child Theme’ is closed to new replies.