Skip to content

Shiftora Pro is free. Pull or push everything: database, media, plugins, themes and must-use plugins.

Get Pro For Free
Get Pro For Free Sign in

Pull a Live WordPress Site to Local Without Breaking URLs

Guide 5 min read

To pull a live WordPress site into a local environment without broken URLs, log into the local site with Shiftora installed, pull from the live site, and let the automatic address rewrite point the links at your local domain. Then add find and replace rules for any old live address the rewrite misses.

Why this direction is easy

The free plugin pulls, and the destination is the site that does the pulling. In this case the destination is your local site, so the local machine makes the outbound requests. The live site only has to answer, which it already does, so you do not need a tunnel or a temporary public address.

Local sites often run a newer or older PHP version than the live server. Match them where you can, because a version mismatch will show up as errors that look like migration problems.

Steps

  1. Start the local site in Local. Confirm its PHP version against the live server, then install the free Shiftora plugin on the local site and on the live site from https://wordpress.org/plugins/shiftora/.
  2. On the live site, copy the “Connection Info” line from Shiftora. Paste it into the local site’s Shiftora screen to pair the two.
  3. On the local site, choose the pull. The local site is the destination and the live site is the source.
  4. Make sure the live site allows pulls. A site-wide switch on the source controls whether other sites may pull from it. Turn it on for this job only, and only on a site you administer. Switch it off when you finish.
  5. Pick the database tables. All tables are ticked by default and Shiftora’s own tables are never sent. Leave them ticked unless you know a table is only relevant on the live server, such as a large log table you have no use for locally.
  6. Decide on media. A large live media library takes time. Move it in its own run if you want the database done first.
Shiftora Migrate screen asking what to migrate, with Database and Uploads options
Choose what moves: the database, the media library or both. Table selection and custom find and replace sit under Advanced.
  1. Before you start, note that Shiftora saves a restore point on the local site before every pull. If you have local edits you want to keep, export them first or make a copy of the local site. The pull replaces the database tables you selected.
  2. Start the pull and let it run. The job continues through Action Scheduler if you close the tab. Watch the progress screen and the per-migration log for chunk errors.
  3. Check the address rewrite. Shiftora changes the live address to the local address in site links and content. Load a few pages and open the browser console. Look for requests to the live domain.
  4. Fix the leftovers with find and replace. Add From and To rows for absolute URLs that the rewrite did not catch, such as a CDN hostname, a hard-coded value in an options row or an address stored inside page builder data. Rules run after the automatic rewrite and handle serialized data safely. Put longer strings first, so a short domain does not partly match a longer path.
  5. Copy the theme and plugins. They are not pulled. Copy wp-content/themes, wp-content/plugins and wp-content/mu-plugins from the live server with SFTP or rsync, using the same versions as the live site.
  6. Check for forced HTTPS. If the live site forces SSL in wp-config.php, in a plugin or in the web server, the local site will redirect to a secure address it cannot serve. Remove the redirect locally, or set up a local certificate.
  7. Search the database for the live domain. Use the database tool that Local provides, or search a dump file. Expect zero hits in post content, options and menus. Hits in comments or logs are less important.
  8. Switch off the pull switch on the live site.

Keep the local copy safe to use

A pulled site holds production data. Real customer emails, order details and form entries are now on your machine. Use a local mail catcher so a test form or a password reset cannot reach a real person. Replace live payment gateway keys with test keys, and disable any scheduled task that calls an outside service, such as a backup job that uploads to a cloud account or a newsletter sync.

Plugin versions need the same care. If the live site runs a newer plugin version than the local copy, the database can hold settings the local version does not understand. Match the live versions first, then test.

Expect a second pull. Each pull replaces the selected tables, so keep your own local changes in version control or export them before every run. The Shiftora documentation at https://shiftora.devsync-agency.com/documentation/ covers the pull screen and the log. Read it before your first run.

FAQ

Will pulling into local change the live site?
No. A pull writes to the destination, which here is the local site. The live site only supplies the data.

Why do images still load from the live domain after the pull?
Usually an absolute URL sits somewhere the automatic rewrite does not reach, such as a CDN setting, a theme option or a serialized value. Find it with a database search and add a find and replace row for that exact string.

Should I pull on top of a local site I am still editing?
No. The pull replaces the selected tables. Export your local changes or copy the local site first, so you can get them back.

Next step: pull into a fresh local site first, so your current working copy is not the only copy you have.

Get Shiftora Pro For Free

Pro is free while we launch. Confirm your email and we send the download and your license key.

No card needed. Your license arrives by email right after you confirm.