Error message: #2005 – Unknown MySQL server host ‘WP_HOST’ (1)
Flatpress to WordPress
Moving from Flatpress to WordPress can be regarded as quite an easy task. The problem is that there is not much you can do about except exporting all the posts into a SQL format using a tool supplied; FlatPress Wiki. In order to run the SQL file for inserting all my Flatpress posts into my WordPress account, I need a SQL tool. I installed Portable phpMyAdmin initially since it’s one of the recommended SQL tools. However, I got the error message as attached above. I didn’t pursue further and so, I installed Adminer. It worked great until I tried to import my Flatpress posts using its SQL importer. My job involves creating SQL statements, procedures, views and database management. However, the errors that Adminer threw out were totally unknown to me.
I went back to Portable phpMyAdmin and tackled the login screen problem. On the plugin official website, it states the following.
If the user doesn’t know the MySQL credentials, the plugin extracts them straight from wp-config.php. This plugin requires PHP 5+
Obviously, it didn’t work on this occasion and there’s a problem with the WP_Host somewhere in the settings. In order to set things right, I have to FTP to my site and edit the Portable phpMyAdmin config file. I always use Net2FTP for any FTP tasks. From the root, I navigate to wp-content/plugins/portable-phpmyadmin/wp-pma-mod and edit config.inc.php file. Within those lines, there’s online one WP_Host. I renamed it to localhost and voila!
Through Portable phpMyAdmin, the error messages were clearer. I was able to clear all the errors and eventually, import all my Flatpress posts to my new WordPress blog.