Cloning a Wordpress Install



Cloning a Wordpress installation is a very quick way to toy with Wordpress, make changes without worrying about breaking something, or just have a separate copy of the install without having to be in the same workspace as your friend/colleague.

When you clone a workspace, everything within that whole environment is cloned, including the database, value for value. This means that URLs and domain names on that Wordpress install will still be pointing to the old workspace’s information and things will break.

While there are instructions on how to do this at the official Moving Wordpress thread (under Changing Your Domain Name and URLs), the following instructions should suffice.

  1. Install WP-CLI (See guide here)
  2. Run a search-replace for your previous application preview URL and your new application preview URL.
  • The command will look like this:
    wp search-replace '' ''

Note: You can include your entire application URL if you’d like but just the chunk of it that’s actually different is necessary. If you’re cloning from an old workspace that uses rather than then be sure to include that part of the URL in the search-replace.

Wordpress wp-login.php Redirecting to wrong URL
Tutorials - Table of Contents
unlisted #2

listed #3


I have do exactly as your guide , but when i run my cloned wordpress site, it redirect the original site such as : will redirect to . Can you help me, please? thank



It happened to me as well. It’s caching issue. Below link helped me.

As Sumit pointed out, the problem was in the old browser cache. The solution was to clear browser cache (or just add a query string after the address: