Is is OK to back up a WordPress installation while it is serving content?

by Harold Fischer   Last Updated January 05, 2018 20:04 PM

Kind of shocked I have to ask this question, I'm surprised nobody has ever asked it on ProWebmasters or Server Fault.

Running a LEMP stack on Ubuntu 16.04. Found plenty of great documentation for backing up WordPress.

So first you export your database:

mysqldump --add-drop-table -h mysql_hostserver -u mysql_username -p mysql_databasename

Then you copy the webroot where WordPress is located:

cp -a /var/www/nginx/ /home/$USER/WPBackup/

So here's the question- can I backup the MySQL database and WordPress installation safely and effectively while LEMP is serving content? It seems like it could be a bad idea to make a backup while the database and WordPress files are being accessed.

No where in the WordPress documentation do I see a mention of whether or not it is safe to backup a WordPress installation that is serving content. If I cannot serve content while I am backing up WordPress I may have something of a problem on my hand, as any amount of downtime is bad news for myself and the clients I host websites for.

If I backup WordPress while LEMP is serving content, will the backup of my database and/or WordPress installation risk becoming corrupted while it is being created? If so, how else could I go about backup up a WordPress installation without downtime, however little, coming into the equation?

Related Questions

nginx proxy pass to standalone application

Updated May 04, 2018 17:04 PM

Access denied - Phpmyadmin

Updated April 08, 2017 07:04 AM