LochStudios  /  Help Centre  /  WordPress  /  Back Up and Migrate a WordPress Site

Back Up and Migrate a WordPress Site

Back up WordPress on our shared hosting with hourly copies, Toolkit, or your own files and database, then move the site to this account or a new domain.

Updated

A WordPress site is two pieces: the files (themes, plugins, uploads, wp-config.php) and the MariaDB database (posts, pages, users, settings). A backup is a copy of both. A migration is the same copy, restored in a new folder or on a new name, then the stored URLs updated so links and images still work.

This article is for Beginner and Standard shared hosting (cPanel) in Australia. Open cPanel from the portal. Do not guess a hostname.

On a VPS you manage files, MariaDB, and snapshots yourself. Credentials and the console are on that server in the portal. Open a support ticket if you want us to walk through a cutover.

On a dedicated server, open a support ticket and we will walk you through access.

Moving any site (not only WordPress) onto this account? Follow Migrate your website to us with minimal downtime for DNS, mail, and the hosts-file test. Starting fresh? Use WordPress Toolkit or Installatron, not a zip from wordpress.org. See Install WordPress.

A step is unclear? Open a support ticket and we will help.

Open cPanel

  1. Sign in at the portal.
  2. Open the hosting service for the site.
  3. Click Log in to cPanel.

You do not need a server hostname to get in.

Copies we already keep

Every Beginner and Standard plan includes Acronis hourly backups. Those copies live on a separate server and do not use your disk quota. You do not turn them on.

Restore points sit in a 30-day window. To put the account, the WordPress folder, or the database back from one of those points, open a support ticket. Tell us the domain, what to restore, and the date and time you want.

Hourly copies are not a file you download yourself. For a copy on your computer, use the steps below. Full account restore details: Download and Restore a Backup.

Back up from WordPress Toolkit or Installatron

If Toolkit or Installatron already lists this install, use that tool first. It packages the files and the database together.

WordPress Toolkit

  1. In cPanel, open WordPress Toolkit.
  2. Find the site.
  3. Open Backup / Restore (some themes label it Backups).
  4. Create a backup that includes files and the database.
  5. Download the archive to your computer.

Restore from the same screen when you need that copy back. Clone is the easier path when you want a test copy on a subdomain instead of overwriting the live folder.

Installatron

  1. In cPanel, open Installatron.
  2. Open My Applications and choose the WordPress install.
  3. Use Backup, then download the file.

If Toolkit or Installatron offers Import or Clone for a move, you can use that. If the control is not there, or you are not sure it is the right job, use the file and database steps below, or open a support ticket.

Toolkit and Installatron archives that stay on the account do count toward disk. Download them, then delete the leftover file. See Check Disk Usage.

Your own copy in cPanel

Use Backup or Backup Wizard in the Files section when you want a home-directory archive or a single MariaDB dump. Download it, then delete the archive from the account so it does not fill the plan.

Step-by-step: Download and Restore a Backup.

Manual copy: files and phpMyAdmin

Use this when Toolkit does not list the site, or you want a .sql file you can open.

Files

  1. Open the File Manager.
  2. Turn on Show Hidden Files (dotfiles) so .htaccess and .user.ini are visible.
  3. Go to the document root (public_html for the main domain, or the addon / subdomain folder).
  4. Select the WordPress files, Compress them, and Download the archive.

For a large wp-content folder, use FTP instead. Copy the host from FTP Accounts → Configure FTP Client. If public DNS still points somewhere else, use the Shared IP Address from cPanel General Information as the FTP host.

Database

  1. In cPanel, open phpMyAdmin.
  2. Select the WordPress database (the full name, prefixed with the account username).
  3. Open Export, leave Quick and SQL, click Go, and save the .sql file.

The database name is in wp-config.php as DB_NAME. If the file is too large for Export or Import, open a support ticket.

Extra copy with a plugin

A plugin such as UpdraftPlus, BackWPup, or Duplicator can send a copy to storage you control (your computer, Google Drive, Dropbox). That is an extra copy. It does not replace the hourly backups we keep, and it does not replace a Toolkit or cPanel archive before a redesign.

Do not leave plugin archives in public_html. They count toward disk and can be fetched if the site is compromised. Download them, then delete them from the account.

Before you migrate

Decide what is moving:

  • Onto this account from somewhere else (same domain, then you switch AtlasDNS).
  • To a new domain on this account (addon domain or subdomain).
  • Both (new account and new name).

Leave the old copy online until the new one is tested. Do not cancel the old hosting, and do not delete the live site.

Need hosting first? Browse shared hosting, VPS, or dedicated. After the account is ready: Getting started after you order hosting.

Match PHP to what the site already runs, if you know it. See Choose your PHP version.

If the site takes orders, comments, or other live writes, plan a short freeze on the old copy so you do not lose rows written after you export.

Keep the files and .sql on your computer for at least 30 days after the move.

Move an existing site onto this account

Do this before you change nameservers. Visitors should still see the old copy.

Do not run a fresh WordPress install into the same folder you are about to fill. Toolkit and Installatron create a new database and files. You want the copy you already have.

  1. Upload the WordPress files into the document root you mean (public_html, or the addon / subdomain root). Include hidden files. Extract a zip so the files sit in that root, not in an extra /wordpress/ folder inside it.
  2. Create a MariaDB database and user. Copy the full prefixed names. The host the site should use is localhost.
  3. In phpMyAdmin, select the new empty database and Import the .sql file.
  4. Edit wp-config.php in the File Manager. Set DB_NAME, DB_USER, and DB_PASSWORD to the full prefixed values. Leave DB_HOST as localhost. Do not put the website domain in the host field.
define( 'DB_NAME', 'username_dbname' );
define( 'DB_USER', 'username_dbuser' );
define( 'DB_PASSWORD', 'the-password-you-set' );
define( 'DB_HOST', 'localhost' );
  1. If the domain name is changing, update stored URLs (next section) before you switch public DNS.
  2. Test without changing public DNS. Use a hosts file (steps in Migrate your website to us) or browse a subdomain if you cloned there.
  3. Only when the test looks right, point the domain at AtlasDNS. If you registered the name with us at /domains, it is already on AtlasDNS: open Domains → the domain → DNS and set the A records to this account's Shared IP Address. If the name is registered elsewhere, set nameservers to:
ns1.atlasdns.net.au
ns2.atlasdns.net.au
ns3.atlasdns.net.au

AtlasDNS is the default. Do not send the domain to a third-party DNS host. Full steps: Point your domain at your hosting.

cPanel Zone Editor applies only when the domain is in cPanel Hosting DNS mode (paired with this hosting service). Unsure which mode you are on? Open a support ticket.

  1. After the name resolves here, open SSL/TLS Status in cPanel and run AutoSSL if a certificate is not there yet. Then in WordPress go to Settings → General and confirm both addresses use https://. Save Settings → Permalinks once so rewrite rules rebuild.

DNS can take hours, and sometimes up to 48 hours, to show everywhere. See DNS propagation explained.

Want us to copy the site for you? Open a support ticket and tell us the domain and whether mail is moving too.

Copy the site to a new domain on this account

  1. Add the new name as an addon domain or subdomain.
  2. Prefer WordPress Toolkit → Clone (or Installatron clone) into that document root. It copies files and database and rewrites the URL for you.
  3. If you clone by hand, copy the files, create a new database, import the .sql, point wp-config.php at that database, then run the URL replace below.
  4. Point the new name at this account on AtlasDNS. Then wait for AutoSSL.

Do not reuse the live database for the copy. Two sites sharing one database will overwrite each other.

Update WordPress URLs

WordPress stores the site URL in the database (and inside some plugin and theme settings). A file copy alone is not enough when the name changes.

Prefer a tool that understands serialised PHP. A raw REPLACE() on every table can break widgets and theme options. Better Search Replace (Plugins → Add New) is the usual in-dashboard tool. WordPress Toolkit Clone and Copy Data do this rewrite for you.

  1. Log in to the new copy (use the hosts file or the new name if it already resolves here).
  2. Install and activate Better Search Replace.
  3. Go to Tools → Better Search Replace.
  4. Find the old URL and replace with the new one. Run both http:// and https:// forms if the old site used both, and both www and the bare name if those appear in the database.
  5. Tick a dry run first, then run it for real.

To set only the two core options (home and site URL) while you get into wp-admin:

  1. Open phpMyAdmin and select the database.
  2. Open the SQL tab. Change the table prefix if this install does not use wp_.
UPDATE wp_options
SET option_value = 'https://newsite.com'
WHERE option_name IN ('home', 'siteurl');
  1. Click Go. Then finish the rest of the URLs with Better Search Replace.

After the replace: Settings → General should show the new https:// addresses, and Settings → Permalinks → Save should be clicked once.

After the move

  • Check pages, images, forms, and a login in a private window.
  • Confirm AutoSSL on SSL/TLS Status. Background: Understanding SSL/TLS and HTTPS.
  • Keep the old hosting account for about a week so you can roll back if you missed a file or a mailbox.
  • Keep the files and .sql you downloaded for at least 30 days.
  • Hourly backups are already running on this account. Still take your own copy before the next redesign.

If something is not working

"Error establishing a database connection"
Check the full prefixed database name, user, password, and host localhost in wp-config.php. See Fix "Error Establishing a Database Connection" in WordPress.

Images missing or internal links still on the old name
The old URL is still in the database. Re-run the search and replace. Check both http:// and https://.

Cannot log in to wp-admin after the move
Clear cookies for the old and new names, or use a private window. Confirm home and siteurl match the name you are visiting.

White screen or HTTP 500
See Fix the WordPress White Screen of Death / HTTP 500.

The public name still shows the old site
DNS has not updated everywhere yet. Wait, try a private window or another network, then see DNS propagation explained.

The site is slow on this account
Open Resource Usage / Metrics in cPanel. See Read your resource usage and metrics. If you are on the limit, open a support ticket and we will look at the plan with you.

Do not wait on an email thread. Open a support ticket and we will help.

Related


Was this article helpful?

← Back to WordPress