Support » Fixing WordPress » How to keep galleries work when I’m importing content?

  • I have quite big WordPress blog (over 1300 posts and 28k images). I need to export all content to the other server and it looks like big challenge.

    My problem is that classic export/import .xml procedure doesn’t work – the amount of data to transfer between servers is too big (over 2GB of images) and process stops after few minutes (dont know the reason).

    Other option is to use import procedure only for posts and transfer all media files through ftp (download from old server and then upload to the new one). But I think there will be a huge problem for me because I have many galleries on my blog which use images ID’s instead of URL’s (like this: [gallery link="file" ids="123,124,125,126,127,..."]). After I will upload all media files they will have a new ID’s so my galleries will be completly broken. Am I right and if there is some way I can keep my galleries work?

    • This topic was modified 6 months, 2 weeks ago by  mwasilewicz.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator Steven Stern (sterndata)


    Support Team Volunteer

    Rather than use the tools->export, tools->import procedure, you can use plugins like ‘duplicator’ to move a site or simply do it manually:

    Assuming you do not have shell access on each host,

    1. Disable all caching and security plugins on the source site.
    2. Export your datababase via phpmyadmin, downloading the .sql file
    3. Using your favorite FTP client (e.g., filezilla), download all files from the soruce site.
    4. On the new host, create a new empty database.
    5. Import the .sql file you downloaded in 2.
    6. Edit the downloaded wp-config.php file to match the DB* parameters you used when you created the database in 4.
    7. Via FTP, upload all files and directories from 3.
    8. Change your DNS to point to the new host.

    That should be it.

    Once the DNS change propagates, login, re-enable caching and security. You can help with the DNS propagation time by changing the TTL for the domain’s A record to 60 minutes a day or so prior to the migration.

    The biggest time sink on this is the download/upload time and depends on the speed of your internet connection. Because you’re moving the database, all IDs are preserved, as are logins, etc.

    If there is a domain name change involved, it is best to use the plugin, because it will handle the name change in all the right places in the database. (Some parts are serialized, others are not.)

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to keep galleries work when I’m importing content?’ is closed to new replies.