0

I migrated everything using a plugin, but all of the links on the site are broken. The site is just copied over to a dev instance, and the only thing that comes up successfully is the home page and the external links.

If I don't have a domain name set up for this dev host after migrating, what value am I setting on the search/replace to replace the old domain name? Just the IP address? Even after trying that, my links still don't resolve on the new host.

Plugins used:

Better Search and Replace

All-in-One WP Migration

2 Answers 2

1

Since you can see the homepage, things are going well. For the search and replace, use whatever is your new url for your homepage. If it is just an IP, then use that one, just make sure you make similar replace, e.g: If you search for oldsite.com it's ok to replace with #.#.#.# but not with http://#.#.#.#, since you will end up with http://http://#.#.#.# for sure. But if you also used the protocol part (http:// or https://) make the same in your replace: search for http://oldsite , then replace with http://#.#.#.#

In general we can check the following places for remains of the old url, and that could cause problems:

1) In our new domain database, we find the #_options table (where # is your DB prefix) and under the option_name column search for the siteurl and home entries and check their option_value values.

2) We can also check our wp-config.php file for the following entries define('WP_HOME','http://oldsite.com'); and define('WP_SITEURL','http://oldsite.com');

3) In the server of our new domain we check if there was also tranfered the .htaccess file from the old site and if yes, we check it for hardcoded redirections or anything indicating to the oldsite and make the according changes.

0

Ideally, the plugin should take of everything. After migration, the user should not do any manual adjustments except for clearing the re-saving the permalinks. I think the plugin that you use for migration may be broken or has some issues.

If its broken, I wont fix migration issues at the target site might require tons of time in troubleshooting and debugging. It's also not a good practice. Imagine, fixing issues every time you migrate?

It would be faster to simply find a replacement plugin for migration that works.

Have you tried migrating using other plugins? Let me suggest one that works for me:

https://wordpress.org/plugins/prime-mover/

It's a new plugin but it never fails me to migrate from live site to dev server or vice-versa. The good thing is that plugin handles everything (from auto-adjusting search -replace, etc.). All you need to do is generate a package and then restore it. As simple as that.

Usually I use it like this:

At your Source Site (live site for example)

  • Install and activate Prime Mover
  • Go to Tools - Migration
  • Generate Export and download it to your Desktop. You can choose to export everything (database + media + plugins/themes) which is suitable if you want a complete migration.

At your localhost / dev server / target site for migration

  • In your localhost, do a fresh WordPress installation.(should be new, not an existing site)
  • Install and activate Prime Mover.
  • Go to Tools - Migration.
  • Click Import and restore the generated package.
  • Wait until the restoration is complete, do not any open any admin pages just wait until its done.

  • That's it, your site is now migrated. If you view the front end, it should not show any broken links.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.