• I don’t know if this is the proper thread to post, but I’ll start here.

    I have an online version of my website running just fine.

    I wanted to create a local version on my laptop to test a new update to the theme I’m using before I went live with it. (Good idea, as it turns out since they replaced the slider and none of my sliders now work.)

    HOWEVER…that’s NOT the problem.

    SOMEHOW in trying to duplicate the site on my laptop (localhost:8888 – using MAMP) I noticed the localhost version switching to the online version. That is, when I clicked a link on the local install, suddenly I’m on the online site.

    The procedure I used was to:
    Download the home folder from inMotionHosting using their Backup routine
    Download the DB
    Pull out the subdirectory containing the online site
    Edit the DB so that pointers online would be redirected to localhost
    Bring up the site
    Keep fiddling with the DB until the correct edits work.

    I know the problem occurred because I must have missed an edit in the sql database file, which, BTW, I have NOT found a single migration tool worth a darn (except PANTHEON).

    Anyhow, then I go to the online site and all my links are trashed and the styling is gone!

    THANK HEAVEN I had just backed up the file (BTW VaultPress is WORTHLESS – there is no clear indication of a total website backup – only segments that are WORTHLESS for reconstructing a backup – food for thought before you blow the $99 for a license).

    I had, a couple of days ago done a backup through inMotionHostings’ cPanel. Restoring the DB fixed the problem with the online version.

    I guess the point of this post is to ask if there are any best practices to creating a local copy of the online version of the website. Otherwise, you’re currently updating two separate versions all the time. (Although, I think i’ll have to take a closer look at Transmit’s Sync option. That MIGHT be the solution to this problem.)

    Why would my localhost install “reach out” to the online version and change it?

    Anyhow, any pointers to documents explaining how to do this would be appreciated.

    Thanks,
    John

Viewing 3 replies - 1 through 3 (of 3 total)
  • I have never had problems when I followed this documentation to a make a Test environment (from a Production WordPress web site, i.e. – Cloning) pretty much anywhere:
    https://codex.www.ads-software.com/Moving_WordPress

    I see that you misunderstood Duplicator’s support for local environments. They support use of Duplicator in XAMPP and other localhost environments on a local computer. They just don’t help people get their localhost environments set up properly.

    While we would love to teach everyone how to setup and configure a local web server, we just don’t have the bandwidth for this type of free help. Basic support does not include help with setting/configuring a web server or development environment. Because these types of issues have consumed so much time in the past we can no longer provide the time and resources. We do apologize for this, but its just not feasible at this point in time.

    Below are some resources that will get you started. If you’re having trouble getting your local environment setups please use the general WordPress forums to ask your question(s). If you receive errors from the Duplicator on your local development box please feel free to submit a ticket here and we will try to help or at least steer you in the right direction.

    Below are some very helpful links that will help you get going with custom development environments. You can also hire very affordable technical staff from the Duplicator Resource page. These IT pros can help you isolate and pin-point your issues very quickly and very affordable.

    You may wish to reconsider Duplicator, though it does make more sense to follow the Codex steps first, to get a better understanding, that will help if you run into issues with Duplicator.

    Remote –

    – ZIP contents of site and download
    – use phpMyAdmin to export db

    Local – MAMP (default settings, site located in folder named mylocalsite for example … Applications/MAMP/htdocs/mylocalsite)

    – use phpMyAdmin to create new, empty db
    – import the export .sql file
    – edit siteurl and home fields in wp_options table to reflect local url, e.g. https://localhost:8888/mylocalsite
    – extract site ZIP into `mylocalsite’
    – edit wp-config.php in mylocalsite with the local db credentials:

    — DB Name: whatever you named it
    — DB User: root
    — DB Pwd: root
    — DB Host: localhost
    — Table prefix: wp_ or whatever it was on the remote site

    Login to WP dashboard https://localhost:8888/mylocalsite/wp-admin, install and run this plugin:

    https://www.ads-software.com/plugins/velvet-blues-update-urls/
    (select ALL options EXCEPT the last one (GUID)

    To address any links stored as serialized strings (which the above plugin does not handle), install and run this script:

    https://interconnectit.com/products/search-and-replace-for-wordpress-databases/

    Done ?? … works first time, every time in under 5 minutes ??

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Local Install of WP trashed my Online Version’ is closed to new replies.