• Ok, after a long wait, I finally decided to upgrade to 2.0.3. I think I made a huge mistake. I followed the simple instructions, deleted all but the wp-content folders and files. Accidentally I deleted my .htaccess file as well. Now, I know how to restore the .htaccess file by adding the values from the database. But I’m stuck. I’ve uploaded the new files and the new .htaccess file. Nothing is working. It’s giving me a 500 error. Some one please please help!

Viewing 15 replies - 1 through 15 (of 23 total)
  • Now, I know how to restore the .htaccess file by adding the values from the database

    Upload an empty .htaccess file and after chmoding to 666 – let WP to write it. See if it works.

    Thread Starter simran88

    (@simran88)

    Done. I uploaded an empty .htaccess file. Now at least I’m seeing the WordPress logo and this message:

    “Error establishing a database connection

    This either means that the username and password information in your wp-config.php file is incorrect or we can’t contact the database server at localhost. This could mean your host’s database server is down.

    Are you sure you have the correct username and password?
    Are you sure that you have typed the correct hostname?
    Are you sure that the database server is running?
    If you’re unsure what these terms mean you should probably contact your host. If you still need help you can always visit the WordPress Support Forums.”

    This is when I try and run the upgrade.php file in /wp-admin

    When you accidentally deleted files – did you keep the wp-config.php file? Check if the 4 pieces of info in it are correct.

    Thread Starter simran88

    (@simran88)

    Damn. I think I deleted wp-config.php as well. Does that mean I’ve lost all my posts?

    I don’t think so. All your content (posts, Pages, comments, settings etc.) are stored in the database. If you didn’t over-write it, hopefully, everything is still there.
    The error message you are getting means exactly what it says: it cannot connect to the database. It doesn’t say there is no database 🙂

    If you have access to phpMyadmin you can check what is in your database.
    Do you have by any chance a copy of your old config file?

    Thread Starter simran88

    (@simran88)

    Actually, I’m so stupid, that I don’t.

    Let me tell you exactly what I did.

    1. I downloaded 2.0.3.
    2. Deleted everything with a “wp-” before it except for the wp-content folder.
    3. Uploaded all the new files.

    Now how can I fix this? Thank you for responding. Your help means a lot to me.

    You need to know the name of the database in mysql, and the username and password. Fill those values in wp-config.php. You can get a fresh copy of that file from the sample included in the wordpress files. Just copy it to wp-config.php, and edit the values.

    If you don’t know the database name, username, and password, your webhost should be able to tell you.

    Do you have access to your database? Do you have phpMyadmin?

    Seemingly it’s just the database name that is incorrect!

    Thread Starter simran88

    (@simran88)

    Yes, I do have access to my CPanel and the MySql database therein.

    I was just trying to run the setup-config file and it asked me to create a wp-config-sample.php with which it will create a wp-config.php file. I downloaded the wp-config file, added my username and password inside it and uploaded it as wp-config-sample.php.

    While setting it up this is the error I got:

    Warning: Cannot modify header information – headers already sent by (output started at /home/simran/public_html/blog/wp-admin/setup-config.php:22) in /home/simran/public_html/blog/wp-includes/wp-db.php on line 308

    I was just trying to run the setup-config file

    Don’t do that.
    Don’t panic and try all kind of weird things 🙂
    Just answer the questions and try to follow the instructions. It will make everybody’s job easier.

    In cPanel, click on MySQL databases (not phpMyadmin).
    You will see all your databases there and also the pieces of info (db name, db user, db host) you need for your config file. If you got that, just put those into the sample-config file that comes with the downloaded WP package, save it as wp-config.php and upload it to your WP directory.
    Do not run install, do not run upgrade – just try to access your blog.

    Thread Starter simran88

    (@simran88)

    oh. ok. sorry 🙂

    tell me what to do.

    Thread Starter simran88

    (@simran88)

    ok, I entered all the information and uploaded the file as wp-config.php. my blog isn’t accessible. http://www.simran.in/blog

    Thread Starter simran88

    (@simran88)

    ok hang on. I just found out that I misspelled something. correcting it.

    Thread Starter simran88

    (@simran88)

    damn! not working.

Viewing 15 replies - 1 through 15 (of 23 total)
  • The topic ‘Restoring a WordPress blog’ is closed to new replies.