BACK UP FILES
- Login to your cPanel
- Find the root directory of you website (normally public_html)
- Double click on public_html to open the folder
- Click on the first file/fold in the directory – hold your shift key – click on the last file/folder in that directory – all should be highlighted
- Right mouse click on any of the highlighted files and a menu should appear
- Choose Compress
- For windows, I choose “Zip Archive”
- Click Compress Files
- It will name the zip after the first file/fold in the directory – my files was cgi-bin.zip
- Rename to whatever is relevant i.e. domainname-backup-date.zip
- Right mouse click on file & download your computer
- Next find your database name by looking in your wp-config file (double-click will download the file) open with note-pad and look for DB_NAME
BACK UP DATABASE
- Go back to cPanel
- Under Databases choose phpMyAdmin
- On the left menu find the database that is used by your WordPress Site (DB_Name above)
- Click once on the name all tables should now show on the left and be highlighted
- Click Export from the top menu
- Quick – display only the minimal options
- SQL format
- Click GO
MOVE TO SECURE LOCATION
- All files that we download should show on the bottom bar of your browser (if they are not there, look in your download fold on your machine)
- Right click on one and choose open in folder
- Highlight and move these files to a location you will remember. It is always a good idea to keep several copies in different locations – on your hard drive, on an external hard drive that is not normally connected to your computer, and on the cloud as well
Then to move to a new domain name:
Upload the zip and extract
Create a new database, user name and assign user to database
Import database
After you import your database, go to the wp_options table and select Edit. You need to change the location of your website in this table.
- Locate the words ‘siteurl’ and ‘home’.
- For siteurl, under option_value, replace the old domain name with the new one. Press enter to save.
- Next for home, repeat the same step. Replace the domain name with the new one and hit enter.
- Go to cPanel public_html > wp-config.php. Right-click and edit this file. If you’re using FTP, you need to download the file, and open it in any text editor to make the changes.
- Find the following lines:
- update the database user & password
More Info: https://blogvault.net/moving-wordpress-site-to-another-domain/