
I recently purchased an existing WordPress website and domain -KingKoilMattresse.net- from an auction site. This was the first existing WordPress website I had ever purchased or auctioned, and had no clue on how to move and set up WordPress website on my Hostgator hosting account.
The reason I did not setup my own WordPress website was because I wanted to speed up implementation time and take advantage of the fact that this blog had already some age and Adsense monetization working. So I would only have to use my SEO experience to improve Search Engine ranking for the niche keywords.
The lady, lets name her Maria, that had sold me the domain and corresponding WordPress website told me she would send me all the information needed, but what I received were two zipped backup files, one with the database sql import file and the other was the WordPress domain directory. The only indications regarding setting up the WordPress website I got were that I had to upload the files to my server. Was this all I needed? What do you think?
Even though WordPress is very easy to install and manage, moving an existing WordPress Website to my hosting server should be a little more complex than that. I thought that there must be more to it, especially as the WordPress database file had another database prefix, which is usually your hosting account ID. The format is something like MYHOSTID_MYDBNAME; so let’s name Maria’s database file maria89_wpbd123.sql. My Database prefix is andre55.
I know that when you restore a MySQL database in cpanel that it takes the sql file name to import the tables it into the same-named database, or creates a new one. I tried it out and as a result a MySQL database named andre58_maria89wpbd123 was created. The database restore had stripped out the underscore and added my database prefix. Not very nice
I then wrote Maria back asking for more details, and whether there were any specifics that I needed to take into account for moving, setting up or configuring her specific the WordPress website. She apologized and replied that she did not know how to handle this and suggested having a live chat with hostgator support. Maria probably thought that moving a WordPress website from one hosting server to another would be as easy as she initially said, so I could not count on her and did not insist futher. Hostgator has an outstanding support, so this was not a too bad idea, but then I decided that I would first have a go on my own.
So here comes how I proceeded for moving, setting up and configuring her WordPress website on my hosting server …There may be a quicker way, but it worked great for me and, in the end, if you know some simple but important details, the set up is pretty straight forward. Let’s first outline the basic steps required to transfer the domain to and set up the WordPress website on my hosting server.
- Transfer the domain to your domain service provider
- Set up the domain on your hosting server
- Upload the WordPress database files
- Configure your WordPress website
What do you need before you start?
- WordPress Database MySQL restore file, DBprefix_DBname.sql
- The complete WordPress website directory
- The current WordPress admin userid and password
So let’s go a little more into detail on each step of the set up process…
1. Transferring the domain to my domain service provider
If you have also purchased the corresponding domain, the very first step is to get the domain transferred to your domain service provider. This will be done by the owner. If you have the same domain service provider, this is usually very simple; it’s called “pushing”.
Unfortunately Maria had another domain service provider than I am using (namecheap). So to make things easy I created a free account with her domain service provider and will take care of transferring the domain to namecheap later on. Maria then “pushed the domain into my account, I accepted it, and then pointed the domain to hostgator’s DNS server. That was the easy part.
2. Setting up the domain on your hosting server
I have a Hostgator Baby Plan, which includes unlimited add-on domains. I logged into my cpanel and created the new add-on domain. This is pretty simple, so I won’t go into more details here. I did NOT need to create a WordPress Blog Website installation. This is done by restoring the WordPress database and uploading the WordPress website directory files I got to the domain’s root directory.
I then entered my new domain name in the internet browser’s address bar and saw that all was working so far, because I could see the empty cgi-bin directory that is created by default.
Now I could upload the WordPress website directory content to the domain directory, located below the root directory; in my case KingKoilMattresse.net. You can either do this via FTP or use the cpanel > Files > Backups wizard.
I reentered the domain name in the internet browser address bar and got the expected database connection error. First of all I did not have the DB installed yet and the connection information would be incorrect anyway. We will see how this part of our WordPress website setup can be achieved.
3. Upload the WordPress Database files
Let’s break this part down into 3 simple steps:
- Create the WordPress Database and access information
- Modify the WordPress Database content
- Upload the WordPress Database (cpanel)
1. Create the WordPress Database and access information (cpanel)
You could restore the database directly, but for this exercise I will also explain why I created the WordPress database myself. So here comes the tricky part. When you want to access the WordPress website, it will first try to connect to the WordPress database. The corresponding access information is stored in the wp-config.php file, located in the root directory of the new domain. You can look it up in the WordPress directory files you got. Therefore, you will need to change the following three variables inside the wp-config.php file:
/** The name of the database for WordPress */
define(‘DB_NAME’, ‘andre55_ akkingb’); ->
/** MySQL database username */
define(‘DB_USER’, ‘andre55_ akdbadm‘);
/** MySQL database password */
define(‘DB_PASSWORD’, ‘xxxxxxxxxx’);
The DB_PASSWORD parameter I got is encrypted and of no use to me, therefore the connection will fail. To get around this problem I will show you a little trick; I reuse an existing user (and password) already assigned to another WordPress Database.
First I created the WordPress database, akkingb (in cpanel > Databases > MySql Databases) and added the EXISTING user to the new database (Scroll down to MySQL Users and add the user andre55_ akdbadm to the database you just created, andre55_ akkingb, and assign ALL PRIVILEGES.
Now I only need modify DB_NAME parameter, copy the values for DB_USER and ‘DB_PASSWORD from the wp-config.php file of my EXISTING WordPress Blog, and the connection will work perfectly
So, download or extract the wp-config.php file for your new WordPress blog, change the parameters and upload it again.
2. Modify the WordPress Database content
There is some information in the WordPress Website that you can either modify later on, when you have managed to access your new WordPress blog or change it directly in the WordPress Database file. I prefer to do the latter, as it is quite simple and a nice time saver when configuring the WordPress Website.
There are a few generic values that are used in diverse places so if you do a find/replace (all) it’s a matter of minutes to get this done. I will tell you what tables are affected, so you know where to look and change it manually, but you can simply do a global change too:
wp_options table – Change values of:
- ‘admin_email’, ‘xxxxxxxxxx@yyyy.com’ –> myadmin@ddddd.com.)
- Path prefixes : /home/uuuuuuuu/public_html/ –> /home/andre55/public_html/
wp_users table: Change value of user_email field for the admin user so you will be able to have the password reset
xxxxx@yyyy.com.’ –> myadmin@ddddd.com.
That’s it!
The user_email is especially helpful if you do not know the WordPress website’s admin password. Simply request the password to be reset and you will get the password send to the email you chose
3. Upload the WordPress Database (cpanel)
The important point here is to name the WordPress database sql file correctly. When restoring via the cpanel it will use the database according to the WordPress database sql file name. Do NOT add a database prefix, as this will be assigned automatically, and should be your hosting server ID; in my case, andre55. Hence, I named my file akkingb.sql, and the resulting complete database name will be andre55_ akkingb.
I had problems with WordPress Database restores when the file was not zipped in the correct format. The restore either did not run at all or broke at any point. Therefore I would advise you to get the free Gzip file compression utility. For more information go to www.gzip.org. The syntax is “C:\Program Files\GnuWin32\bin\gzip.exe” DBname.sql” and this will convert the DBname.sql into a DBname.sql.gz file.
To restore the WordPress Database, in cpanel, go the Files > Backup Wizard, select “Restore” > MySQL Databases, locate you local MySQL restore file, akkingb.sql.gz and click “Restore”. Now a new browser window will open up and the DB restore should start within seconds.
You know that the restore should have terminated correctly if you see the whole WordPress Database file on this page. You can verify the DB creation also through the cpanel > Databases > Php Admin panel. All your MySQL databases are listed on the left hand side.
We are almost done!
. You should now be able to see your new blog and enter the admin panel yourdomain/wp-admin.
4. Configuring your WordPress Website
Any WordPress Blog configuration is different, but following I will name just some of the WordPress Website settings I consider important…
* WordPress SETTINGS*
General:
- Membership: Anyone can register
- Timezone
Writing:
- Remote Publishing: set both values active if you want to use external publishing tools
- Privacy: I would like my blog to be visible to everyone, including search engines (like Google, Bing, Technorati)
- Permalinks: you may want to change to i.e. /%category%/%postname%/ OR /%postname%.html, or any other values you use in your other blogs
AllInOneSEO Plugin
- Use noindex for Categories: false
- Use noindex for Archives: true
* WordPress PLUGINS*
- Akismet Configuration: Enter YOUR Akismet API Key
- Remove or add any other Plugins
*OTHER setting and configurations*
- Copy your robots.txt to root folder or install the KB Robots.txt plugin
- Monetizeation like Adsense, Amazon, will requiere even editing he corresponding theme files or configuration through plugins,…
That’s it, your WordPress Website has been moved and setup on your hosting server
Related posts:
- WordPress SEO Secrets Revealed Takes you by the hand and shows you step-by-step everything...
- WordPress Video Tutorials Massive WordPress Video Course… Step By Step Guide Shows How...
Related posts brought to you by Yet Another Related Posts Plugin.





