• Resolved Robert

    (@robg48)


    Happy New Year all!

    I have a 22mb .sql export from 3 years ago. The original domain name (tslxxx.com) that it came from is currently being used for something totally different so all I have is the .sql file.

    I created a sub-domain – blog.tslxxx.com – installed WP 4.1, the original version of theme I had 3 years ago (Suffusion), changed the db name in the .sql file (I also did a search/replace tslxxx.com/blog.tslxxx.com, and then I found this information and ran the following SQL commands

    UPDATE wp_posts SET guid = replace(guid, 'https://www.old-domain.com','https://www.new-domain.com');
    UPDATE wp_posts SET post_content = replace(post_content, 'https://www.old-domain.com', 'https://www.new-domain.com');
    UPDATE wp_postmeta SET meta_value = replace(meta_value, 'https://www.old-domain.com', 'https://www.new-domain.com');
    UPDATE wp_options SET option_value = replace(option_value, 'https://www.old-domain.com', 'https://www.new-domain.com') WHERE option_name = 'home' OR option_name = 'siteurl';

    Now when I go to the sub-domain – blog.tslxxx.com it shows, completely in an unformatted way, categories and articles. When I click on any article or category – or even when I try to login it brings me to the top domain – tslxxx.com.

    The only time I’ve done this in the past I was restoring to the same domain name…;)

    I have no problems deleting the entire db and webspace of the sub-domain and starting from scratch but I’m just not sure what I’ve missed – if you’ve read this far maybe you did?

    As always any help is much appreciated!
    Rob

Viewing 1 replies (of 1 total)
  • Thread Starter Robert

    (@robg48)

    Started from scratch and everything worked!

    And then I decided to go with a sub-directory rather than sub-domain…lol

Viewing 1 replies (of 1 total)
  • The topic ‘Old sql export file into a new db & domain’ is closed to new replies.