Remote Database Backup WordPress PluginBy Binny V A • Oct 13th, 2008 • Category: Blogging, Database, MySQL, PHP, Scripts, WordPress
I have released my second WordPress Plugin – Remote Database Backup. Its is based on the WordPress Database Backup plugin. If you are a regular wordpress user, you might be better off using WordPress Database Backup plugin instead of my version. But if you, like me, have a local server on your system and has a copy of your site on the local server as well as the online server, you will find great use for my plugin.
My plugin is designed to make it possible to remotely create and download wordpress database backup in form of SQL dumps. You can then use these dumps to sync the local version of your site with the online version.
Backuping your WordPress Database
- Install Remote Database Backup Plugin in WordPress
- Login to WordPress site
- Go to the Backup Page(Manage > DB Backup)
- Create a backup
- Download the backup file to your system
Sync With Local Server
And if you have a local version of your site, you can sync it with the online site using the backup file. Just follow these steps…
- Extract the backup file(its in the tar.gz format)
- Import it into your mysql database.
- Make some changes to the database(like set the home url) so that wordpress works locally
You can do all these steps manually – or you can use the automation script I have cooked up. You need PHP installed in your system for this to work(I assume you already have PHP if you have a local version of wordpress).
To use the script, first install the plugin. Then download the script and rename it to ‘backup.php'(the extension must be ‘php’ instead of ‘txt’. Now open it in your favorite editor and change the variables to match your site. You can run it by opening a terminal/command prompt and navigating to that folder and executing the command ‘php backup.php’. This will automatically make a backup and sync it with your local database.
Let me know how it works for you if you are installing the plugin – its the first release – so I need some feedback.