• Resolved mendocinotim

    (@mendocinotim)


    I have a WP site that I host locally.
    It’s web address is https://swing-thing.com.

    I have made several modifications, including to the header.php file, so I could control what was in the menu bar – I have since discovered there are plugins that will do this instead, and I want to use those in the clone, as well as normalize the entire site so it is more WP normal – and want to remove many of the hacks.

    I use this as a CMS – with many pages.
    It also has a shopping cart plugin from the current live site that I want to replace in the clone as well.

    1. I copied the (live) wordpress folder, and renamed it wordpressDEV.
    2. I created a subdomain https://wordpress.videvent.com for the clone.
    3. I then changed the wp-config.php file for the clone to look for a completely different mySQL DB, which I also created in MySQL as an empty DB.
    4. I then created a MySQL dump of the tables for the live site, and imported them all into the new table.

    I could then log into the site.
    So far, so good.

    Here’s my problem.
    I had set up the live site to use the shopping cart’s front page as the site’s home page in WP settings. And, because I had hard coded the menu items in the header.php file, there is no way for me to navigate the site now, without it taking me back to the live site.
    In fact, when I try going to https://wordpress.videvent.com/wp-admin I am always redirected to the wp-admin page for the live site as well.

    What do I do please?

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

    (@mendocinotim)

    Hey – I just figured it out on my own.

    For other’s, here’s what I did.

    In the mySQL dump – I used BBEdit to find and replace all instances of..

    “swing-thing.com” with “wordpress.videvent.com”

    And then, because the dump file would have entries in it that would read “www.wordpress.videvent.com” – which would not resolve – I then did another search and replace for “www.wordpress.videvent.com” and replaced those with “wordpress.videvent.com” as well.

    And then, because the dump file still had some instances of left over, I did one last search and replace, looking for “swing-thing” and replaced all those with wordpress.videvent”.

    After that, I made similar search and replaces in the site files – BBEdit has the ability to search an entire set of folders with nested folders, and can search and replace “swing-thing.com” with “wordpress.videvent.com”, and then again “www.wordpress.videvent.com” with “wordpress.videvent.com” just to be sure.

    I then deleted all the new MySQL tables, and re imported the now updated MySQL dump file to recreate the tables.

    And it worked.

    Now, I have an exact clone of my site that I can work on without affecting my live site. I can, for example, now delete the old shopping cart and replace it with another; I can fix any php hacks, and try to bring the development copy back to the way it should be – and use plugins to control my main navigation bar, the way I should have in the beginning – had I known how back then (which I didn’t).

Viewing 1 replies (of 1 total)
  • The topic ‘Need to clone full site to make extensive mods, and then will make it live later’ is closed to new replies.