About one year ago I started my blogging activity (I described that here (polish language)). I bought fancy domain and hosting with huge discount for newcomers. It seemed cool – in case that blogging is not interesting for me I can easily try and forget.
Luckily, I discovered, that it would be cool to keep blogging, so I started looking for new hosting because the renewal of the current one was too epensive. In the same moment I started thinking about the easiest way to migrate WordPress to new server. I found out that way and I decided to write it down here, so it can safe your time too!
Each hosting is different, so I will present generic steps here. I want to give you just an overall view what to do. Basically, WordPress requires disk space and database. And those 2 elements we will migrate.
- Connect to source server via FTP (by e.g. FileZilla application) and copy WordPress directory (usually called wp) to your destination server.
- Export your database on source server to the SQL file. Usually there is an option for that. If not, go to phpAdmin panel and export database from there.
- Create new database on your destination server (remember the username, password and database name). Import the exported SQL file to newly created database. In case that there is no import option, you can just execute sql script against your database.
- On your destination server, update username, password, database name and host name in wp-config.php file (which you will find in default WordPress directory, e.g. wp/wp-config.php). The keys to update are as follow: DB_USER, DB_PASSWORD, DB_NAME, DB_HOST.
- Redirect your domain to new server.
That’s all! Congratulations, you have just migrated WordPress to new server!
Bonus (20% discount promo code)
I have chosen to buy hosting service in polish provider LH.pl. They offer good hosting in reasonable price. If you also find their’s offer interesting, I have 20% discount promo code for you! When completing the order just use this code LH-20-79490 to get reduced price.