WordPress.org

Forums

Re-installing WP Using Old Database + Manipulating Article Dates (11 posts)

  1. halfbloodprince
    Member
    Posted 8 years ago #

    Hey, people.

    I run an online music magazine here.

    Some time ago, I'd integrated it with WordPress, and things were working fine. I tried to implement my own theme as well (a little later, the 're-design' mentioned in that link), but soon got frustrated due to problems with the cache on WordPress, and also because the theme kept reverting to the default WordPress theme. Due to a tight deadline, I had to uninstall WordPress, and revert to using 'vanilla PHP' (or whatever).

    I have taken some time to go through these forums, and I found some solutions to the cache problem, so I've decided to use WordPress again for the site.

    I have just some questions, though.

    [1] I still have the old database from the first install (even though I uninstalled WordPress, I retained the database). If I install WordPress now, can I configure it to use the old database, so that I won't have to copy-paste all the articles and comments again?

    [2] If I do a fresh install of WordPress, what happens to all my article dates? Do the dates of all previous articles get changed to the date that I install WordPress? Is there any way I can manipulate dates in MySQL/phpMyAdmin?

    Thank you for taking the time to go through this post, and I would really appreciate any help that I get on this.

  2. moshu
    Member
    Posted 8 years ago #

    1. Yes, you can use the old database with a new set of WP files. Do not make install! Just upload the WP files, edit the config file to connect to the DB and you are good to go!
    Warning! Install the same version of WP as it was before you deleted: the DB structure has been changed between the versions, so install exactly the same as it was. After that you can upgrade if you want.

    2. The dates are stored in the DB and re-using the DB will not change them. Again, do not run the install.php file if you re-upload the WP files.

    Is it clear or do you need more help? Post back if you have more questions.

  3. halfbloodprince
    Member
    Posted 8 years ago #

    Thanks for your reply, moshu.

    So, let me get this straight.

    I was using WordPress ver. 2.01 for the site. I'll get the same version from the 'Downloads' section.

    Then, I'll edit the wp-config.php file to connect to the old database, and upload it to the required location on my server. (Just so you know, I'm planning to upload the files to http://www.mydomain.com/beta and test that everything works, before I move them to http://www.mydomain.com.)

    Then, what you're saying is I should NOT run http://www.mydomain.com/beta/wp-admin/install.php.

    So, if I just edit the wp-config.php file to connect to the old database, and upload the files to the 'beta' folder, I should be able to view my old content at http://www.mydomain.com/beta/ without running install.php — is that correct?

  4. moshu
    Member
    Posted 8 years ago #

    That's exactly what I was saying! (and it doesn't really matter where the WP install will be - root or a beta subfolder).

    Oops, I almost forget one little detail: In your DB in the "options' table there are 2 values:
    site_url and home.
    When the files are uploaded to the example.com/beta
    go into the DB with phpMyadmin and change those two values to point to the new location of the blog. Here is the guide how to do it:
    http://www.tamba2.org.uk/wordpress/site-url/

    The reason NOT to run the install - it would want to over-write your database which would result in loosing all the old posts!
    (old versions of WP: http://static.wordpress.org/archive/)

  5. halfbloodprince
    Member
    Posted 8 years ago #

    Hey, thanks for the link for the old versions of WordPress. I'm just wondering if I should get ver. 2.0.1 or ver. 2.0.1-RC1 :-s

  6. moshu
    Member
    Posted 8 years ago #

    Didn't I give the link above?

  7. halfbloodprince
    Member
    Posted 8 years ago #

    Yeah, I was typing my second question about the old versions when you posted your reply, so I hadn't actually seen your reply when I typed that :)

    I edited my query above ^^

  8. moshu
    Member
    Posted 8 years ago #

    Only you could know... RC was a Release Candidate, so maybe 2.0.1.

  9. halfbloodprince
    Member
    Posted 8 years ago #

    Okay... thanks a lot, moshu. I really appreciate all the help!

  10. halfbloodprince
    Member
    Posted 8 years ago #

    Hey, moshu.

    I did what you said, and it seems to be working. Only thing is, if I click on any permalink (article titles, etc.) it gives me a 404 document error. As in, the articles are showing properly on the home page, but if I click on the permalink to go to the article page it gives me a 404 document error.

    Also, while editing posts, the 'Preview' pane shows me the 404.php page, but I am able to make changes in the articles.

    Any ideas?

  11. halfbloodprince
    Member
    Posted 8 years ago #

    Hey, it's okay. I fixed it, it was an issue with .htaccess. Thanks, anyway :)

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.