WordPress site migration instructions
Here you can find instructions for migrating a WordPress site from an external service provider to Seravo.com service. If you wish, you can also order the migration work to be carried out by Seravo’s WordPress experts. Ask for a quote!
Method 1: With the help of the All-in-One WP Migration plugin (easy)
The easiest way to migrate a WordPress site to a new installation is to use Seravo.com’s pre-installed All-in-One WP Migration plugin.
NOTE! All-in-One WP Migration only works reliably for small sites.
1. Install and activate the plugin on the site that is to be transferred.
2. Export the site with the help of the Export function in to a zip file by selecting Export to -> File.
3. Download the file on to your computer.
4. Activate the plugin in Seravo.com and import the zip file with the Import function by selecting Import from -> File.
5. The plugin asks to ensure that your website is backed up. There is no need for it now, so you can press “Continue”.
6. Ready! The plugin asks you to save the permalink structure, which you can do by selecting the “Permalinks Settings” link. The Permalinks Settings page opens in a new browser window, and at the bottom of the page you will find a “Save settings” button.
Would you like Seravo’s WP experts to help you with moving your site? Request a quote for the migration service.
Method 2: SSH & WP-CLI (advanced)
In order to move your site with the WordPress command line tool, you will need a SSH connection on both computers and WP-CLI must be installed on both computers. Migration via the command line is the most certain migration method.
Information of old server (example)
WordPress installation directory: /var/www/htdocs
Seravo.com information (example)
WordPress installation directory: /data/wordpress/htdocs
1. Start by logging in to the old server
my-computer:~$ ssh email@example.com
2. Check that WP-CLI is installed
firstname.lastname@example.org:~$ wp --version WP-CLI 0.17.0
3. Create an export file of the WordPress database
NOTE! Remember to set WordPress’s installation directory with the –path parameters.
email@example.com:~$ wp db export --path=/var/www/htdocs/ ~/wordpress-database.sql
If the message file has table definitions (for example
ENGINE=MylSAM), they must be removed. In addition, if you would like the table prefix to be something other than
wp_, it should be changed in both table names and e.g. in the field names of the
wp_options table (e.g.
firstname.lastname@example.org:~$ sed -i 's/ENGINE=MyISAM//g' ~/wordpress-tietokanta.sql
4. Log in to Seravo.com with the SSH login details
email@example.com:~$ exit my-computer:~$ ssh firstname.lastname@example.org -p 10350
5. Copy WordPress’s wp-content directory from the old server
The migration may take tens of minutes depending on the size and quantity of the exported files.
example@example-wordpress:~$ rsync -avz --stats email@example.com:~/wordpress-database.sql /data/db example@example-wordpress:~$ rsync -avz --stats firstname.lastname@example.org:/var/www/htdocs/wp-content /data/wordpress/htdocs
6. Import the database with the WP-CLI tool
example@example-wordpress:~$ wp db import /data/db/wordpress-kanta.sql
7. Ready! Finally, make any necessary search-replace database changes
esimerkki@esimerkki-wordpress:~$ wp search-replace "/var/www/htdocs/wp-content" "/data/wordpress/htdocs/wp-content"
Method 3: FTP and manual database export
If there is no SSH access to the old server, but only an FTP connection, the site’s files can be copied manually from Seravo.com with the following command:
esimerkki@esimerkki-wordpress:~$ wget -rl0 -nc -nH -nv "ftp://user:email@example.com:/public_html/wp-content"
FTP does not use a secure connection and the username/password are visible in the network without encryption. If the service provider does not have SSH and SFTP connection, stop using the service as soon as possible.
Because a database export cannot be done from the command line without a SSH connection, it must be done manually with e.g. Adminer, PHPMyAdmin or a similar tool. The selection of tools depends on the old service provider.
For servers, which only have a FTP connection available, the WP Migrate DB plugin can be used for copying the database. After this, the database is easy to move to Seravo.com with the wp db import command.
Additional tip: Scandinavian letters and character set conversions
If Scandinavian letters are muddled up in file names, for example, because the old server used a different character set than UTF-8 encoding, the file names can be converted with the convmv command. Common old character sets are Windows-1255, ISO-8859-1 and ISO-8859-15. Depending on what was in use on the old server, one of the following commands must be run:
$ convmv -f ISO-8859-15 -t UTF-8 -r * $ convmv -f windows-1255 -t UTF-8 -r *
The command is run in WordPress’s main directory
/data/wordpress and due to the parameter
-r, the conversion is also performed on files in all subfolders. The above command will indicate what the result of the conversion would be, but it does not perform it yet. If the conversion is not performed correctly, it could completely mess up the character set of the file names. When it is certain that the character set conversion is correct, the parameter
-notest must be added to the above command, in order for the command to be run.
If the Scandinavian letters are muddled up within the text files, the character set of the file content can be converted with the recode command. The file’s current character set can be viewed with the file command, such as below:
$ file example.php
example.txt: ISO-8859-15 text/code>
The conversion can be done, for example, by running the command