A personal reminder how I made my first „soft“ migration of a WordPress installation.
Due to „Meltdown/Spectre“, my web hosting company (uberspace.de) told me that the web server - where my old blog (coastery.com) has been hosted on up until today - is in danger to be hacked. Therefore, it became my duty to move all my data (around 10 GB) to another server.
Luckily, I had another account running with Uberspace which made the migration easier than I thought. This is what I did.
Downloaded everything (!) that I could via my FTP program (Transmit for macOS)
Used WordPress’s export function (/wp-admin/export.php) to have all content (except for media files/uploads) downloaded
Used WordPress plugin „UpdraftPlus - Backup/Restore“ to additionally have a backup of the database, plugins, themes, uploads, and what UpdraftPlus calls „others“ (don’t know exactly what it is). Note: Having done step 1) und 2), it’s redundant to do step 3). Yes, I know. I’m only going the safe way since I don’t want to lose data (it has happened to me in the past)
Used Uberspace’s database program „Adminer“ (adminer.eridanus.uberspace.de) to export the exact the database that was used on my blog. I chose the gzip (.gz) version because it’s smaller and downloaded it.
Made a local copy from the downloaded backup of the WordPress installation folder and edited the wp-config.php: I updated the DB_NAME, DB_USER and DB_PASSWORD.
Used Uberspace’s database program „Adminer“ (adminer.acrux.uberspace.de - yes, a different server) to important the database I had downloaded in step 4. IMPORTANT: Initially, for the new server (acrux) I created a new database manually. That was a mistake because on top of the SQL file that was inside the downloaded .gz file there was a CREATE DATABASE command, this one:
CREATE DATABASE naii_coastery_wordpress
/!40100 DEFAULT CHARACTER SET latin1 /;
USE naii_coastery_wordpress
;
So, I couldn’t use the .gz file directly because CREATE DATABASE command inside in the SQL file would have created a database with a name prefix that is not allowed in Adminer. „naii_“ was the prefix that was ok to use for the old server but „coastery_“ only is the allowed prefix that is ok to use on the new server.
So, I unzipped the .gz file and changed the CREATE DATABASE commend to the following:
CREATE DATABASE `coastery_coastery-com-blog-2018-02-03` /*!40100 DEFAULT CHARACTER SET latin1 */;
USE `coastery_coastery-com-blog-2018-02-03`;
Then, importing .sql file via Adminer interface worked.
There was a hint on wordpress.org saying:
„If you had any kind of rewrites (permalinks) setup you must disable .htaccess and reconfigure permalinks when it goes live.“
So, before I had checked whether coastery.com worked, I disabled the .htaccess file by renaming it to „_.htaccess“. When I saw that coastery.com worked, I enabled it again by renaming it back to to „.htaccess“. I don’t know whether this step was necessary but I did it anyway.
If I haven’t forgotten a step. That’s how I made my transition - that I thought would be hard - pretty easy. I applied this new knowledge to my other WordPress blog (naii.nu) to prove whether what I learned really works, and yes it worked - and renaming the .htaccess file was also not necessary. :)
You can join my free email course „Story Creation Masterclass“ now and pre-order my book PARADISE soon.
served by naii.io