WordPress.org

Ready to get started?Download WordPress

Forums

Reinstallation failed - error in wp-config.php (12 posts)

  1. Chateaupoulet
    Member
    Posted 1 year ago #

    Hi there,

    I wonder if anyone can help me with this problem.

    I attempted an automatic upgrade of WordPress via the dashboard which failed during the database update.

    I then uninstalled WordPress via my hosting provider and re-installed (V. 3.3.1) it again from there and then tried copying my backup of the site from my hard drive over.

    I modified wp-config.php to specify the new MySQL settings and copied it across.

    Now when I try to access the site I get the following error:

    Parse error: syntax error, unexpected $end in /homez.514/irishtre/www/wp-config.php on line 1

    I didn't touch line 1, which contains <?php, as it should.

    Is there anything I am missing?

    http://www.irishtreesociety.com

    Thank you.

  2. esmi
    Theme Diva & Forum Moderator
    Posted 1 year ago #

    How exactly did you edit the wp-config.php file? What text editor did you use? You may have inadvertently added a non-printable character to the top of the file.

  3. Chateaupoulet
    Member
    Posted 1 year ago #

    Using Notepad++ esmi.

  4. esmi
    Theme Diva & Forum Moderator
    Posted 1 year ago #

    That should be fine. The only thing I can suggest is that you try re-creating the file again from wp-config-sample.php.

    However, do check the format that the file is being saved in. I don't use Notepad++ myself but in my text editor (TextPad), I can save files in PC, Mac or Unix format. On a *nix server, I always use the Unix format. Also check that you are uploading the file in ASCII mode in your FTP client. If it's being uploaded as binary, that could also screw things up.

  5. Chateaupoulet
    Member
    Posted 1 year ago #

    Many thanks esmi. The transfer and the format are correct.

    I'll follow your advice and try to re-create the file again.

  6. Chateaupoulet
    Member
    Posted 1 year ago #

    Interesting. I re-created wp-config.php from the sample and now I'm getting this:

    Fatal error: Call to undefined function add_custom_background() in /homez.514/irishtre/www/wp-content/themes/twentyten/functions.php on line 104

    So getting a bit further, but I'm not sure what to do about this one!

  7. esmi
    Theme Diva & Forum Moderator
    Posted 1 year ago #

    It's beginning to sound like something has corrupted files generally. Did you notice any problems when uploading by FTP? Was the upload process stopping or starting? Or running very slow?

    Try re-uploading all files & folders - except the wp-content folder - from a fresh download of WordPress.

  8. Chateaupoulet
    Member
    Posted 1 year ago #

    I think you are spot on. I did notice slowness and pauses in the FTP.

    When you say fresh download - would it be ok to use the WordPress installation module provided by my hosting service, having deleted the one there now?

    Or should I just bite the bullet and do it all myself?

    I have never installed WordPress manually that's all.

  9. esmi
    Theme Diva & Forum Moderator
    Posted 1 year ago #

    If you can possibly manage, I'd recommend a manual install. Most of the time 1-click installers are great but, here, we do notice significantly more problems after using them compared to manual installs.

  10. Eric Andrew Lewis
    Member
    Posted 1 year ago #

  11. Chateaupoulet
    Member
    Posted 1 year ago #

    Well I'll split the difference.

    I'll do a 1 click first and then if that does not work I'll head for the coalface. It will be a useful exercise to learn a manual install anyway.

    Thank you so much for your help. I'll let you know how I get on!

  12. Chateaupoulet
    Member
    Posted 1 year ago #

    Thank you Eric.

Topic Closed

This topic has been closed to new replies.

About this Topic