Migrating a large WordPress website to a new host or domain

Wordpress Software

Migrating a WordPress website can be very simple – but it gets a little trickier if the site is too large.

Need to move your WordPress website? Whether you’ve moving to a new web server or just a new domain name on an existing server, there are great plugins like All in One WordPress Migration and Duplicator that can make quick work of the job. It just takes a few simple steps:

  • Install the plugin on the existing site
  • Install a new WordPress website at the destination server (or domain folder)
  • Install the plugin on the new site
  • Export your site based on the plugin instructions at the old site
  • Import your site based on the plugin instructions at the new site

For most websites, that’s it. Install two plugins, download a file, then upload it to a new location. That’s all there is to it.

Bigger sites have bigger problems

One notable limitation of these plugins, however, is that they will only let you upload site images of up to 512 MB. Larger websites are asked to buy a premium license, and that can run from between $69-$99. There are some posts out there with advice on editing the PHP files of the plugins to increase the size limit, but this doesn’t seem to work with the newer versions of the plugin.

There are also some other options available, and they’re not as bad as they are intimidating:

  • Database only export
  • Manual migration

Database only export with manual file transfer

If the complete website is too large to fit in a 512MB file, you can always just use the plugins to migrate the trickiest part: the database.

All in one WP migration: Click on All-in-one WP Migration on the left hand menu of the WordPress admin dashboard. Then click export, and “advanced options.” Check the options to disable exporting files, then export to file. This should reduce the total file size of your export while still helping with the tricky part of moving the database.

Do not export files, just the database

Duplicator: Duplicator has similar options. Click on the Duplicator menu from the left hand admin dashboard, then select “Create New” to create a new export package. From this page, select “Archive Only the Database.” You’ll still get the archive and install files, but again, this will hopefully keep you under the file size limit.

A database only export can help with large websites

Moving the files: Once the database-only export has been imported at the destination, the job isn’t quite done. You’ll still need to manually download all of the files in your WordPress directory – then upload them again at the destination server. This can be done easily with a SFTP and SSH program like MobaXTerm, but it does tend to move slowly and take some time. This is especially true if you have a large number of files to download.

Once you’ve connected to the file server, just select the entire public_html folder and download it to a local hard drive. Then connect to the destination’s file server and upload them again.

Updating wp-config.php: And this last step is a critical one! You’ll need to open up and edit your wp-config.php file to point to the new MySQL database location. Update your hostname, username, and password, and then you’re all set!

Fully database manual migration

If everything else has failed and the database-only export doesn’t work or still exceeds the file size limit, you’ll have to do this the hard way. Don’t worry though, it’s not too bad. The exact details will depend on whether you’ve got CPanel or direct command line access or some other interface. I’ll try to cover a few of the most popular hosting configurations, here.

Command line: If you have root access to your MySQL server, log in and type the following in to the command line:

mysqldump -u [username] -p [database] > [database].sql

This will export your database to the file named at [database].sql. You can then download that file and upload it to the new server. You’ll need to create a new database at the new server, then import from the file you created:

CREATE DATABASE newdatabase;
mysql -u [username] -p newdatabase < [database].sql;

You’ll also need to update your wp-config.php file and manually transfer your files, as detailed above. If everything worked as intended though, that should be all it takes!

CPanel: Many webhosts provide CPanel as an administrative alternative to command line access. If this is what you’re working with, follow these steps:

      • Login to CPanel
      • Select phpmyadmin
      • Select a database to export
      • Click export
      • Choose options and set format to SQL
      • Click GO!

Now you’ve got your database in a file. This can be imported through the command line (if that option is available at your new host) or you can also upload it through CPanel:

      • Login to CPanel
      • Click Import
      • Click choose file, and select the exported database file
      • Choose options and set format to SQL
      • Click GO!

 


The process of migrating a WordPress website can certainly seem intimidating, but once you’ve been through it once or twice it starts to feel a little routine. Plugins are great and if your website is small enough, you may never even need to worry about these technical details. But if you do run in to file size or other problems, I hope this guide can help you get your WordPress site to where you want it to be! At the very least, you should never feel trapped at a particular web host just because you started there. There’s always a way to move your data, and it’s honestly not even a whole lot of work!

1 Comment

Leave a Reply to Michel Cancel reply

Your email address will not be published.


*