Skip to main content


Having trouble? Watch on YouTube instead

One way to prepare for a DDoS or other attack is to make regular backups of your site's content so you can restore them or import them into another system in case your web host fails to protect you. It is often a lot of work to restore a backup, but it is better than losing all of your content.

To make a backup of your website on a hosted service, export all of your pages, posts, and comments into a single XML file. It's important to note that this will only back up the text content of your website. Other content, such as images that you've uploaded, will not be included in this backup. The easiest way to make sure you have a backup copy of all of your images is to make a mirror of your site.

To make a backup of your website on when you're using shared hosting or administering on your own server, copy all of the files that make up your website and save a snapshot of your website's database.

If you run your own web server, you should set up automatic backups to a remote server. Useful tools include ssh, scp, mysqldump, and crontab. Step-by-step instructions for setting up automatic backups fall outside of the scope of this guide.

JavaScript license information