Widgets with *internal* links do not display after database migration

  • Import the database on the new server.
  • When your domain name or URLs change there are additional concerns. The files and database can be moved, however references to the old domain name or location will remain in the database, and that can cause issues with links or theme display.

    If you do a search and replace on your entire database to change the URLs, you can cause issues with data serialization, due to the fact that some themes and widgets store values with the length of your URL marked. When this changes, things break. To avoid that serialization issue, you have three options:

    1. Use the Velvet Blues Update URLs or Better Search Replace plugins if you can access your Dashboard.
    2. Use WP-CLI’s search-replace if your hosting provider (or you) have installed WP-CLI.
    3. Use the Search and Replace for WordPress Databases Script to safely change all instances. (If you are a developer, use this option. It is a one step process as opposed to the 15-step procedure below)