Moving WordPress from one server to another is pretty simple. It actually shall not take longer as five minutes following this steps:
1st step – server environment
Check if the basic server environment is the same as you had on the server before, especially for
- PHP-Version (some modules require PHP5 and higher)
- Database-Version (maybe important for your data import)
- special PHP modules (e.g. if you use permalinks, make sure mod_rewrite is activated and running)
If you feel like there is everything alright on the new server, you may want to go ahead.
2nd step – the database
- Export the WordPress database of your former server to a sql-file or to a compressed sql-file. You may either use a GUI tool like phpMyAdmin or the terminal.
- Import this (compressed) sql-file into the database on your server. Use the import function of your GUI tool to do so or the terminal if you are able to login with putty.
- Change the path settings: In the new database of your webserver, you shall find a table called
option_name="siteurl"you will find the path settings you entered during the initial installation process
3rd step – the files
- Connect to your previous server via FTP and download the files of your WordPress document root.
- Upload this files to you new server.
- Using your FTP client, go to the new server’s WordPress document root and open the file
wp-config.php. Adapt the new server’s
database name, the
database server(if needed, localhost is used mostly), the
database username and the
- Check the permissions needed for proper work of your new system:
wp-config.phphas to be set to 0644
– for pucture uploads etc,
/wp-content/uploads/shall be writable (0755 or 0777)
– for updates or automatic plugin installation,
/wp-content/upgrades/shall be writable (0755 or 0777)
- Take care: In Unix-World, e.g. if you are using any Linux or Mac (AFAIK with a FreeBSD under the hood), dotted files are not shown and not copied by default using your FTP client. So the
.htaccessfile which is important if you activated the so called “Permalinks” may be not transferred. Make sure it is on his place.
- Go to Admin -> Settings -> Permalinks. In case you activated this options, at the bottom of this page the current content of your
.htaccessappears like it should be. Probably the value for your RewriteBase changed. Copy this content and overwrite the
.htaccesson your server.
You are done! Congratulations hero!