In the post WordPress: A Disaster Recovery Strategy, I didn’t describe the restore phase. Well, it just so happened that I lost a development site mockup.udance.com.au while isolating an issue between the Simple Calendar plugin and the Pen theme (see post WordPress: Pen Theme 1.3.9 and Simple Calendar Plugin 3.1.33 Anomaly). When switching between themes, the site faltered and a critical error message was displayed on the screen. I tried setting up WP debug, but the problem must have been serious because nothing was logged. I wasn’t able to get to the site dashboard. Fortunately, I had set up UpdraftPlus to backup the site via FTP to FreeNAS storage (see WordPress Plugin: A Marriage made in Heaven for UpdraftPlus and FreeNAS). So, from testing the restore in artificial conditions, I was now presented with an actual situation of a failed site that needed to be restored from backup.
Broad steps to restore the site:
- Delete the jail and associated datasets.
- Recreate the datasets.
- Run the installation script to rebuild the jail.
- Set up WordPress.
- Install the UpdraftPlus plugin.
- Reconnect the plugin with FTP storage.
- Restore from backup.
The site was restored to the state it was at the time of backup. Changes after that time were lost, however, these were easy enough to recover from.
Given that catastrophic site failure is possible while making site changes, here are some afterthoughts for managing risk and streamlining the recovery process:
- Use the manual backup option in UpdraftPlus to manually backup the site before switching themes.
- When undertaking intensive development work on a site, increase the frequency of automated UpdraftPlus backups (e.g. every two hours). Switch back to a lower frequency when not working on the site (e.g. daily backups). For a stable site, consider an even lower backup frequency (e.g. monthly).