If you’re new to WordPress you’re probably unfamiliar with the process of backing up a website.
Even if you’re a bit overwhelmed at the task or confused as to what to do, backups are one of the most crucial aspects of owning and/or managing a website, so be sure to pay attention in this area.
In the following blog post, we discuss the process of manually backing up a WordPress website. This process entails backing up the MySQL database as well as the site files.
There are a number of automated backup options – plugins, tools, and solutions – available, but beyond setting up an automated backup process, it’s important to know how to manually backup your website should the need arise.
As mentioned above, manually backing up a website will require you to log into the server and export the two core components (site files and database) from two different locations.
The site files will be located within the File Manager console of your server, while your database can be accessed through phpMyAdmin.
For the below guide, we’ll be using cPanel as the server reference. If in the event your server is set up using a different platform, look for the same or similarly worded areas – File Manager and phpMyAdmin – in your user dashboard.
Before you begin, a good practice for this process is to create a folder on your computer and rename it as either your or your client’s business name and follow the name with the date of the backup. Within this folder, create two subfolders called “Site Files” and “Database”.
How to Manually Export Your WordPress Website’s Database
To begin, log in to the admin interface of your website’s cPanel using either your chosen login details or those shared with you by your client.
WordPress uses a MySQL database system to operate. Web developers can interact with the website’s database through the phpMyAdmin console. The database stores a number of indexes, users, tables and more, each which contain various systems and processes relating to the functioning of the website.
To export the database, click on the Databases dropdown and select phpMyAdmin. Once selected, the phpMyAdmin console will open in a new browser tab.
Once you’re inside phpMyAdmin, look on the left-hand side panel and select the database of the website. If the server itself is hosting a number of websites, you’ll see a list of available, linked websites. Once you’ve selected the correct database, the right-hand panel will display all of the tables associated with the site.
Now, click on the tab that says “Export”. Note, in other servers it may be required to scroll down to the bottom of the table list and click a checkbox that says ‘Select All’ before clicking on the “Export” tab.
Once you’re in the Export console, you’ll be met with a few input options:
- Select Quick as the Export method
- Select SQL as the Format option
- Click Go
A file should automatically start downloading and will save to either your Downloads folder or similar. Once the download has completed you should see a file with the suffix .sql saved on your computer. Move this file to the subfolder named “Database”.
For whatever reason, should the database not automatically download, it may display directly within in your phpMyAdmin console. If this happens, simply copy everything in the display box and paste it into a new IDE file (Sublime, Brackets or your computer’s default TextEdit). Once pasted, save the file as db.sql, companyname.sql or similar, and move it to the relevant folder.
Great!
You’ve successfully exported your website’s database. The next step is to export the site files.
How to Manually Export Your WordPress Website’s Site Files
When exporting your website’s site files, the most common route is simply to use CPanel itself. In some cases, users may need to export the site files by using FTP.
Both of these methods are explained below.
Exporting Your WordPress Website’s Site Files Using CPanel
Once you’ve logged into CPanel, navigate to the dashboard and select the File Manager option.
In the File Manager, navigate to the right-hand column and select the folder named ‘public_html’. Note, you may have to move around between folders. Once you’ve located public_html, click on the folder name (not double clicking on it as this will open the folder) and click Compress.
A pop up will appear. Select .zip Archive then click Compress File(s).
Once the files have been compressed, click on the ‘public_html.zip’ folder and click Download.
Once the download is complete, remember to delete the .zip file as it’ll take up unnecessary space on your server. To do this, click on the ‘public_html.zip’ folder and click Delete.
At this point, locate the .zip file and move it to the Site Files folder.
Great! You’ve successfully exported your website’s site files!
If you are unable to export the site files directly from the CPanel, you’ll need to use an FTP client to connect to your website’s server.
What is FTP?
FTP stands for File Transfer Protocol. This useful piece of software allows you to make a connection between a live website’s server and your computer.
With an FTP client, you’re able to access the live server, export and save the site files, and/or move the website’s files onto your desktop, and vice versa. A bit of a confusing interface at first contact, using the FTP client will become second nature with practice.
Two of the leading FTP clients are FileZilla and Cyberduck. Simply visit either of the respective websites, download the latest version of the software and install it on your device.
Once your FTP client has been downloaded and is up and running, you can connect to your website’s server in a few easy steps. For this demonstration, we’ll be using FileZilla.
How To Use FTP To Connect To Your Website’s Server
To connect to your website’s server, you’ll need the FTP login credentials. To locate these details, log into cPanel, navigate to Files and click on FTP Accounts.
If you can’t find the correct login details, contact your hosting service provider.
Once you open up FileZilla, you’ll see two panels:
- The left-hand side (the local site) is your computer
- The right-hand side (the remote site) is the server you will be connecting to.
Now, navigate to File > Site Manager.
Next, a window will pop up. Click on ‘New Site’ and give the website a name.
In the right-hand panel, you’ll be asked to specify a number of details:
- Host is usually the domain name of the website in question
- Select Normal as the Logon Type
- Enter the relevant details for the Username and Password
When you’ve entered all of the above, click Connect. FileZilla will save all of these settings so you won’t have to re-enter all of the information the next time you connect to the server.
Once you connect to the server, look under the “Remote Site” panel and you’ll see a list of your website’s files and folders. Click on the dropdown arrow and scroll until you see a folder named “public_html”. This folder is also called the root folder and it is the entire collection of your website’s site files.
If you’ve previously set up local sites or created a child theme, you’ll see that some of these files and folders look quite familiar.
This folder, the public_html folder, is what we’ll export for the backup.
How to Manually Export Your WordPress Website’s Site Files
Remember the folder on your desktop called “Website Name” with the subfolders “Site Files” and “Database”? Well, we’ll be transferring the contents of the public_html folder into the Site Files folder
In the FTP client, head to the left-hand panel and sort through the Local site (your computer) until you find the backup folder.
Next, go to the right-hand side panel and locate the public_html folder of the website you’d like to back up.
Now, click and hold on the public_html folder on the right-hand panel and drag it across to the Site Files folder in the left-hand panel.
Let the transfer/export process run until complete (how long the process takes depends on your internet speed).
Finally, head on over to the “Website Name + Backup Date” folder. You’ll see that the entire public_html folder is there, as well as the SQL database in the Database folder.
Now that you’ve backed up the website’s database and it’s site files, you can rest easy knowing that you’ve safeguarded yourself and your client’s website.