How to Backup a WordPress Site

You need to back up a website, but you don't know where to start? Here is the complete tutorial to avoid mistakes!
backup WordPress site

When you own or manage a website, one of the most common anxieties is that of losing all or even部分翻译已被截断,按照要求仅提供完整的英译如下: English translation: When you own or manage a website, one of the most common anxieties is that of losing all or even part of your website’s content.

This fear stems from the possibility of making human errors, such as accidentally deleting an article that had been worked on extensively, or due to a cyber attack, seeing one’s site replaced with junk content. Or, a rare but not impossible case, due to technical incidents caused by exceptional circumstances, like fires, earthquakes, floods (after all, there are still millions of physical servers that “aren’t in the clouds”).

Qualunque sia la causa, perdere il proprio sito web o anche solo dati parziali è una situazione indesiderata che possiamo evitare seguendo alcune buone pratiche.

In this article we will talk about how to prevent the bad experience of losing data by making backups of your WordPress website.

What does a WordPress site backup consist of?

Start from the basics: let’s define what a website backup is.

A backup is a collection of elements that allow you to reconstruct the website at a specific point in time.

For regarding the backup of a WordPress site, the backup is usually composed of three fundamental parts:

  • the site code, that contains WordPress, the theme that is used and all the Plugins in use;
  • multimedia content, that for WordPress are all the content from the site’s Administration panel ‘Media’ page;
  • the database, namely all the site data, from configurations to Posts passing through Users.

Once a backup of these three parts is available, it is possible to reconstruct the site at that precise moment in its life.

Why is it important to back up a website?

The backup is a security measure for your data. It allows you to be safe when you make important changes to your site and update WordPress with the peace of mind that, if everything goes wrong, you can always revert to the last backup performed.

Facciamo un esempio pratico: you need to update your company website because at the end of the month you will participate in a fair and you want to present your company and products at their best. So you decide to update the website and make some changes and since you are there you decide to update the theme and the installed plugins.

Ah well something is going wrong. What has broken is not important; what really matters is that it is no longer functioning as before you started modifying it and the wisest thing to do is “go back” with respect to the changes made.

Here are the two possible scenarios:

Restoring your website having a backup

If I have a backup of my website, I put the site in maintenance and recover the last backup. By doing the restore from the backup, the site will return to the pre-changes state, it will function correctly and I will have lost only some of the latest changes made. However, my site will be back online and functioning.

Restoring your website without a backup

If I don’t have a backup of my website, the situation becomes more complex. First of all, one needs to understand what has been lost, rewrite the contents, reload the missing parts hoping that the files (texts, images, videos, graphics) are still saved somewhere.

If instead the site gets hacked, it can go much worse in terms of both time and costs to have to rebuild your website from scratch. So after a bad experience (and only one is enough to learn the lesson), it’s better to look for a good backup system and remember to run it consistently so as to always have an up-to-date copy of the site.

Possible issues when you do a backup

Obviously the backup is not a miraculous action that solves all problems but surely it can solve many. One of the issues is due to the consistency with which backups are executed. There is no universal rule because how often to perform a backup depends on how frequently your site is updated. If you have an eCommerce it is likely that you will need to execute backups more often than a showcase site that updates three times a year.

Riassumendo: more often you make the backup the less risk you run of losing data. It is also true that more often you make the backup the more space you need to store them.

Therefore, you need to find a balance between the frequency and the space that your backups occupy.

Another thing that needs to be careful about is what is saved in the backup.

There are actually some problematic parts of a WordPress site that it would be good not to have in a backup. These are usually the cache files and logs. Let’s see together why.

What problems can caching files cause

The cache files are where the WordPress site stores support data for its proper functioning. Imagine having a chalkboard on which to write: it’s useful because you can write down tasks you need to do and remember them but, as soon as you finish the tasks, you erase the chalkboard.

The cache files, in fact, provide useful information to WordPress on what it is doing at that moment and, as soon as it has finished performing the operation, they are deleted (completely or partially). This means that if restored from a backup, the cache files may contain data for operations already performed or executed halfway through and could cause disruptions or actions we do not want to occur after the backup restoration.

What problems can be caused by log files

The log files are files where WordPress writes what it does, instant after instant. By themselves they are very useful files and do not cause strange effects to the site if restored from a backup (unlike cache files), but they can become large files especially if the site has many visits. This can make your backups over time occupy significantly more space than you would actually need.

Try Hosting4Agency on a site of your choice for 30 days and compare the performance before/after the trial period!

When and why restore a WordPress site backup?

The reason why a backup is usually restored is to solve a problem. Data loss or desire to return to a previous version before the last changes made to the website (which may have broken something). The most common cause are website issues after an unsuccessful WordPress update.

At this point, you need to “reassemble the pieces” of the WordPress site (data, database, and media) by selecting the files from the most recent backup. In the case of more prepared users or use of professional tools, it is possible to restore only part of the data, usually only the “compromised” or “erroneous” part so as to resolve the issue precisely and not on a large scale, avoiding the loss of changes made meanwhile in other areas of the site.

For example, an eCommerce site can continue to function and sell even if you have lost the data for one or two products. In this case, it is worthwhile to recover only the missing data part rather than the entire website.

Possible issues with backup restoration

The restoration of a backup is a very delicate procedure in which problems may arise. It is necessary to be careful when restoring the site’s backup without overwriting the correct data and especially it is advisable to perform the restoration putting the site in ‘maintenance’ so as not to risk losing data while being online and visible to the public.

To ensure that this work involves the least amount of time possible and that the site remains in ‘maintenance’ only the necessary time for the restoration, it is essential to be quick, clean, and efficient because any error made in this phase can further prolong the technical times required for the new publication of the site.

Executing a website backup restore while online and visible to the public is a risk. A user could be in the middle of a purchase on your eCommerce site and not be able to complete the purchase because you are restoring the website backup. Let’s put it plainly: it’s not a good idea!

Conclusions

Per quanto possa sembrare facile e semplice avere il backup di un sito è altrettanto importante avere anche la procedura di ripristino pronta perché, il backup da solo non è sufficiente. Per questo motivo è consigliabile pianificare tutta la procedura e ipotizzare i possibili casi di errore che possono portarti a dover ripetere il ripristino.

We recommend relying on a specialized technician who ensures correct and quick work and backup automation (also because a manual procedure could cause more harm than good) and then supports you especially during the restoration process.

Remember that the backup always serves and it is an error to plan after the production or publication of the site. So these are the three rules to be sure not to lose your own site: backup, backup and backup!

If you want to be certain that the backups and restoration of your websites are always executed flawlessly and you are looking for professionals who can guarantee this result, we might just fit the bill.

Unlike the major providers, we offer dedicated assistance to each company, with technical personnel dedicated to you who deeply understand your needs.

For more information on our custom services and benefits, click on this link.

Afford your website to Hosting4Agency: plan, automate and manage the backup flawlessly!

Continue reading

Share on:

Related Articles

Stop being the troubleshooter. Discover how managed hosting transforms your web agency's servers into recurring revenue with 100% green infrastructure.
Hosting4Agency launches the bilingual site! Discover how to automate translations for web agencies with AI generative, 100% green servers and WPML license included. Zero token costs.
Discover how 100% green enterprise hosting guarantees performance, reduces TCO and supports your company's ESG compliance (Scope 3, GDPR, NIS2).

Contact us

If you want to speak with a team member or, if they have any doubts, do not hesitate to contact us.
Alternatively try to consult our FAQ section.