There are many different ways to back up your WordPress site, with and without plugins.
In this article, we will try to explain how you can fully back up your site based on your level of knowledge. After that, we will talk about how the backups you have taken can be transferred to a new WordPress installation or server. Finally, we’ll cover how you can correctly restore your backups in case of a problem with your site.
What does a WordPress backup include?
The posts, pages, images, custom codes, theme settings, plugins, etc. Basically, it covers all the necessary data.
- Files on your server
- Your database
First of all, we will talk about how you can back up your WordPress installation completely manually without using any plugins.
Step 1: Download the files from your server to your computer.
Depending on the features offered by the hosting company you use, you have the ability to access the directory where WordPress is installed via Cpanel (online FTP / File Manager) or FTP.
Since many popular server services support Cpanel or similar interfaces, we will first talk about how to make a WordPress backup with Cpanel.Taking a backup via Cpanel interface
After logging into Cpanel, click on File Manager. Here you will be able to access data of all sites defined in your hosting account.
If you don’t have any other websites in your account, you can find these files in the public_html or Home directory.
If you have more than one website in your hosting account, the folder that resembles your site name is probably the folder you should back up.
We have transferred all the data except our database.
Step 2: Backing up the database
Just because we have a backup of your files does not mean that our site is backed up completely correctly. Like many content management systems, WordPress can create your pages correctly and save certain information thanks to the information it writes to the database tied to it.
Find the option named PhpMyAdmin in Cpanel and log in to this tool. This option will usually be under the Database or database tools category.
Here you will see the current databases on your server. If you want to determine which database you should back up to, the way to go is simple. These database names are usually created using an abbreviation directly related to the site name.
To avoid this confusion, all you have to do is find the file named wp-config.php and open it in a new tab by clicking “edit”. When you do this, you will see the PHP codes that connect your WordPress files to the database, and you will be able to confirm which database is actively used on your site.
You can find the line define (‘DB_NAME’, ‘database_name_is_here’) and find your database name.
If you want to search easily, use the search feature by applying the CTRL + F key combination after opening the file. Type “DB_NAME” in the search box.
After finding the correct database, you should download it to your computer by clicking the “export” button. SQL can be chosen as the format.
Step 3: Restoring the backed up site
Whether you are doing a restore on the same server or moving your site to a new server, the things you will do are quite similar to each other. We will inform you about minor differences.
First of all, what we basically need to do is to restore the files that create our site to the server. Secondly, we restore our database via PhpMyAdmin. Finally, we connect these two data sets that we have restored.
Assuming that your new server also supports Cpanel, upload the compressed file in which your site files are backed up to the main directory (the directory created with your site name if you host more than one site on the same hosting account). After this file is uploaded, what we need to do is to extract (unzip) our main files, extracting them from this compressed file.
After placing the main files of our site correctly, it is time to restore our database through PhpMyAdmin. The first thing we need to do here is to create a new Database. If you create a database with the same name as our previous database, you won’t need to edit the wp-config.php file. But you can also use a completely new database name if you want, as a result we will still explain how to use and edit the wp-config.php file.
In order to load the backup of our previous database into the new database we created with the same or different name, we’ll need to use the import option. Here, we must select the database file what we have in SQL format from our PC. When the upload is completed successfully, all the details about from the database will appear in the newly created database.
At this stage, enter your site address to your browser (Chrome, Firefox, etc.) to check if additional action is required.
If your domain name has not been changed to target the name servers of your hosting company (Name Server), your domain name will still redirect you to the IP address of your old server. This will result in your site not being displayed.
DNS changes usually go live within 24 hours, but in extreme cases it may take up to 48 hours. Personally, I have not had a situation to wait that long, usually within 2-3 hours, DNS changes become active.
Assuming that you have set the name servers correctly and you allowed the required time, we are moving to the next stage.
If you edit this file correctly, you will be linking your database and WordPress files. As I mentioned before, all you have to do is to open the wp-config.php file with “edit” and enter the correct database, user, password and host information here.
Most of the time, you will have no problem finding the correct information as this information was requested from you before while creating a new database. Ther is a small chance you may need to enter a different IP value in the Host section due to your hosting company. You can often find this IP information via PhpMyAdmin. However, if you cannot find any IP address under PhpMyAdmin or if the connection between the database and WordPress files still fails, what you need to do is to get the relevant information from the live support or support ticket departments of your hosting company.
I think you can get the necessary answer quickly by copying and pasting this template that I have prepared for you.
Hi, I am currently migrating my WordPress website from another host to your servers. I successfully restored my WordPress files and my database. However, I am not sure which info I should have on my wp-config.php file. Thanks.
If you follow these steps, you will be able to restore the backup we have successfully taken to the server you want.Manual Backup – All by hand
The only difference is that you connect to your server via FTP software (Filezilla is an example), which is a more complex method compared to the operations to be performed from Cpanel’s interface. Let me also mention that online FTP software is offered for free by many hosting companies do not use Cpanel. These apps will also do the trick.
Basically all you need to do is download it to all the files in the home directory and save it to your computer. Afterwards, it is to upload these files to the new server or, if you restore, to the same server as it is, to ensure that the files are changed.
If you do not know the FTP credentials, you will need to learn this from your hosting company. Let me share a template again so that you can do this briefly.
Hi, I need my FTP credentials in order to access my files. Is it possible if you can forward me that information or can you create me a new FTP account?
I assume you will be able to restore to your new server similar to the way you backed up files.
Most likely, PhpMyAdmin will be available in a different way, probably under a different name such as an option called My Databases or My Databases. You can export and then import the database.
WordPress Backup PluginBest WordPress Backup Plugin
Problem about most WP backup plugins
Before I talk about the advantages of this plugin, I will explain how some plugins with similar functions can actually “trick” you. All-in-one WP Backup and a few other similar plugins take a backup of your site, but when you run into any problems and it’s time to restore: “Wow!!! The file size is too big, there is a 128 megabyte limit. Switch to the Pro version and remove this limit. ” It annoys you with nonsense like that Their tactic is to force you to spend money just when you need it.
Luckily there is Updraft Plus, a plugin that does its promise to you properly. The advantages of this plugin are as follows:
- You don’t have to deal with databases and files separately
- You have a chance to add instructions on how to backup (backup frequency etc.)
- There is no file limit on backups, I don’t think you will have any problems if you have a standard sized website.
- You can download your backups to your computer or you can accumulate necessary backups in your Google Drive account by authorizing the add-on to access your Google Drive account. And this feature is free.
We find the name of our plugin by searching the plugins section of wordpress, install it and press “Activate”. The extension page is also here.
After activating the plugin, we enter it in the admin panel of our WordPress (/wp-admin) and hover our mouse over the “Settings” section in the left section. Here you can see the specific settings that UpdraftPlus plugin offers.
Downloading a full backup with the plugin
To back up our site, you can press the “Backup Now” button.
In the detailed settings of the plug-in, you can choose the one that suits you from among daily, weekly, monthly, etc. backup options. I am a fan of daily backups. You cannot predict when you might run into a problem.
I do not feel the need to explain the setup for Google Drive in detail. The moment you choose Google Drive as the place to be backed up, the add-on already directs you to provide the necessary permissions to it. I recommend that you examine your Drive folders to determine at least which folder the automatic backups go to.
If you buy the paid version of the plugin, you have the chance to backup to several different locations at the same time. So you can back up to both your server and your Google Drive account. However, I think the free version of the plugin is more than enough.
It is easier to restore than backup. What you need to do here is to select the Restore option on the plugin’s dashboard. If you wish, you can upload the backup file you downloaded on your computer to the plug-in, or you can use one of these backups from the Existing Backups, which the plug-in has previously found.
If you are asked a question about which files to backup at any stage of your operations with this plugin, it would be fine to tick all the options.Among all the methods I’ve mentioned, I think the easiest is to restore with the plugin.
There is also an option, if your hosting company offers advanced backup settings, you will have the chance to restore the automatically taken backups with a few clicks, without having to deal with add-ons or other methods we mentioned.