Back ups are one the most crucial aspects of owning and/or managing a website. If you're new to wordpress you're probably unfamiliar with the process of backing up a website.
In this article, we will discuss the steps of backing up your wordpress website manually. There are quite a number of automated backup options -plugins, tools and solutions available that you can use but beyond setting up an automated backup process, it is pertinent to know how to manually backup your website manually if the need arise.
Manually backing up your website will require you log into your hosting environment and export two core components (database and site files) from two different locations. For this guide, we'll be using cPanel as the server reference. If you server is set up using a different platform, look for the same or similarly worded areas (File Manager and phpMyAdmin) in your server dashboard.
Your database can be accessed through phpMyAdmin while the site files will be located within the File Manager directory of your server/hosting space.
Before you begin this process, it is recommended and a good practice 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”.
1. 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. You can find the login information in an email sent with the subject "New Account Information" to you when the account was created
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.
You’ve successfully exported your website’s database. The next step is to export the site files.
2. 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.
The leading FTP clients is FileZilla . Simply visit the respective website, 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.
If you can’t find the correct login details, contact us on email@example.com
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.
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.