PDA

View Full Version : How to move website (ie Wordpress) from one cpanel to another cpanel subdomain



Fli
01-12-2015, 05:22 PM
Here i would like to share how i moved my Wordpress blog from myblogname.com to myblogname.newdomain.com (domain to subdomain of another domain)

1) backup old hosting account. Files and mysql database/s and download backup (cPanel/Download full backup)
2) restore files and mysql database/s in new hosting account

a) first create subdomain in new cPanel

- upload backup via File manager to this subdomain directory. Note that full backup is not right thing to upload, extract full backup on you PC and find \homedir\public_html\, inside are your site files these needs to be zipped and uploaded to the newly created subdomain directory. cPanel/File manager be used.

- MySQL database is inside \mysql\ directory of the full backup archive. MySQL DB needs to be created from within cPanel/MySQL® Database Wizard and then .sql file imported using cPanel/PHPMyAdmin.

- After this, open cPanel/File Manager and find your subdomain directory. There find configuration file that holds your mysql login data. You will need to update this file to hold new data you just created. Wordpress conf. file is wp-config.php
)
3) add/edit .htaccess file in old hosting account to redirect old domain to new domain


example .htaccess content:



Options +FollowSymLinks
RewriteEngine on
RewriteRule (.*) http://myblogname.newdomain.com/$1 [L,R=301]


it will redirect current domain visitors to new address


4) change old domain to new domain in mysql database. i do it thru PHPMyAdmin mysql manager. In case of Wordpress, i go to mysql table "wp_options" and there find old domain and change it to new domain.

Then site should start working. If not, input errors into Google to get help and if not helpfull, contact hosting provider or try to contact me for paid help.

5) Update links on other websites that lead to your old URL, update visitor counters, analytics, google webmaster tools