0

Transferring domains, I migrated a WordPress database using the export/import functions in phpmyadmin.

Everything worked as intended, until I tried to change permalink appearance in the WP dashboard. Since then, all posts have disappeared from the Posts tab in the WP dashboard. The posts still exist in the DB.

Measures I have tried already:

  • Reimporting the DB from my backed up version.
  • Changing permalink structure back to what it was originally.
  • Running the WordPress database table repair protocol. (It reported no issues).
  • Disabling all plugins.
  • Changing the theme to twentyseventeen.

I even tried importing the DB on a fresh install of WP to see if the posts would show up. Even without modifying the permalinks, they do not.

I can create new posts and they show up in the dashboard without any problems. The permalinks also display properly. I can also visit the old permalink-style URIs of the existing posts and they display properly.

Any further ideas on what to try would be great. My client has existing content they do not wish to lose editing privileges to in the dashboard. Thank you!

  • Did you run a search and replace on the database after the import into PHPMyAdmin? – user2015 Jul 7 '18 at 21:13
0

A great tool for WordPress database and domain migration is Search-Replace-DB. It does all the rename work for you and even takes care of serialized data.

You can find here.

What you should do:

  • Clear the whole database in the target system you fiddled around with.
  • Drop all tables, so that you have an empty database.
  • Re-import the untouched original database from the old domain.
  • Download the three PHP files from SRDB.
    • index.php
    • srdb.class.php
    • srdb.cli.php
  • Upload them in an extra directory in the same folder as your WordPress installation, like ./srdb
    • It should look like:
    • ./srdb
    • ./wp-admin
    • ./wp-content
    • ./...
  • Open it in the browser via http://new-domain.com/srdb

You should see something like this:

Search-Replace-DB

Database credentials should be detected automatically. If not, you put it in the wrong place.

  1. Enter your old domain url
  2. Enter your new domain url
  3. Do a dry run to see if it works.
  4. Do a live run to replace.

Note: This only takes care of the database. If you have domain names hardcoded in your theme files, like CSS, PHP or JS, you have to manually search and replace them.

Hope this helps.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.