• Hi all,
    I am aware of all of the steps to create my local site using MAMP but I don’t want to import my live site’s database as it seems to have many issues in addition to an old theme with various modifications etc, and I just want to start fresh!
    How do i got about this? What info will I be missing if I only export the content and import that content in to a new database on my localhost?
    Thanks!
    Natalie

Viewing 3 replies - 1 through 3 (of 3 total)
  • What info will I be missing if I only [Dashboard > Tools] export the content and [Dashboard > Tools] import that content in to a new database on my localhost?

    Plugin and theme settings/customizations and users. Do the import first and bring your /wp-content/uploads/ folder along exactly as it is, then do a database update of the URL for finding them that came along in as embedded in pages and posts.

    * note: Edit ‘pref’ (three places) to your own table_prefix and change ‘https://www.olddomain.com’ and ‘https://www.newdomain.com’ as required (three places each and with no trailing slashes)

    UPDATE pref_options SET option_value = replace(option_value, 'https://www.olddomain.com', 'https://www.newdomain.com') WHERE option_name = 'home' OR option_name = 'siteurl';
    UPDATE pref_posts SET guid = replace(guid, 'https://www.olddomain.com', 'https://www.newdomain.com');
    UPDATE pref_posts SET post_content = replace(post_content, 'https://www.olddomain.com', 'https://www.newdomain.com');

    Thread Starter pegcitylovely

    (@pegcitylovely)

    Thanks for the quick response @leejosepho
    I’m not worried about the theme customizations as it is an old theme…I can easily recreate the users…although I did have a plugin for inserting html snippets that used shortcodes that i might miss…

    Here are the steps i’ve taken:

    1) create local server on mac with MAMP
    2) create new database
    3) install fresh wordpress install
    4) change wp-config to new database name and localhost
    5) export all content to xml file from live site
    6) import xml file to localhost (with or without attachments?)
    7) copy wp-content/uploads folder to localhost root file folder of same name
    8) enter sql query above on new database (localhost) to change url’s

    I’ve everything except step 7 before and the featured images don’t import

    I will try again! Let me know If I am missing anything! T

    Thanks again
    ??

    the featured images don’t import

    That is fine and you should still have them where they should be after bringing /uploads/ in without changing anything. Then, the SQL should fix the links for *all* uploads.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Only want to export content from live site to localhost NOT that database’ is closed to new replies.