If you’re a WordPress user, then you know that making a backup copy of your blog is essential for keeping your site safe and sound. But what if you don’t have a computer at home or you don’t have the time to make a backup copy? Then there’s the option of using a cloud-based service like Google Drive or iCloud. But what if your site is on a different server or in another country? Then there’s the option of using an FTP client like FileZilla to transfer your blog content to another server. But what if you don’t have FTP access on your computer? Then there’s the option of using Google Drive’s “cloud drive” feature. This feature allows you to store all of your blog content in Google Drive and then access it from any device, computer, or phone. So how do you use this feature? First, open up Google Drive and create an “account” with it. Once you’ve created an account, click on the “cloud drive” icon in the top left corner of the main screen and select “upload.” In the next window, select “files.” In the file selection box, select “wordpress.” Click on the “upload” button and wait for Google Drive to start uploading your files. Once all of your files are uploaded, click on the “done” button to finish uploading them. Now open up FileZilla and browse to where your WordPress blog was located before making this backup copy. You should now see a new folder called “wp-content.” Inside this folder, you’ll find all of your old blog content as well as any new posts that were created since last time we made this backup copy.


First, we’ll need to make a copy of your current WordPress blog. I’m going to assume you have access to the console at your hosting provider, or they at least have some type of backup provided for you. If you get your backup files a different way you can skip that step.

For a blog, we’ve got both the WordPress installation as well as the database, where the text of all your posts are actually stored. If you’ve uploaded images or files, they will be in your wordpress folder structure, so we really need both.

  1. Let’s get a backup of the database first. Connect to the server via SSH and run the following command:

Naturally you’ll want to substitute the uppercase text for the correct values on your installation.

  1. Make a backup of the file structure:

You’ll want to substitute the uppercase text for the root directory of your site.

  1. Copy the files down to your local Ubuntu machine. This can be done via scp, ftp, or however you feel like it. I’ll leave that up to you.

  2. Make sure you have apache, php and mysql installed. If you don’t, you can consult the other how-to guides on this site, or just type in the following commands at a terminal prompt:

  3. We need to create a database and import the original database that we backed up. Navigate to the folder that you downloaded the files to and run these commands:

sudo apt-get install php5

sudo apt-get mysql-server

sudo apt-get php5-mysql

sudo /etc/init.d/apache2 restart

  1. Make our local webserver point to the copy of WordPress we got off the production server. First, we’ll want to extract the tar archive that we created. You can do that however you want, but I prefer the command line. There is a utility built into Ubuntu to allow you to do so graphically if that’s the way you like to do it.

mysql -uroot DATABASENAME < dbbackup.bak

This will produce a directory structure similar to the one on the server you were on. We’re going to imagine that your site root directory is now in /home/username/wordpress/ for the purposes of this article. If you’ve extracted it elsewhere, then substitute accordingly. We need to add in the alias into apache, so open up the following file:

You’ll want to paste in these lines, and adjust the paths according to your system and the /directory you want the test blog to be available on.

  1. If you are using Permalinks, you’ll want to duplicate the same thing locally, and will need to enable mod_rewrite:

  2. Now we’ll need to edit the wp-config file to point to the local database. If you’ve been following along, these settings should work for you once you substitute the database name.

  3. If you are using the using WP-Cache caching module, navigate to your blog root directory and run these commands:

  4. One final thing left to do. The data in the database still has the wrong URL for your blog. The easiest way to fix this is by running a SQL statement against the database. Create a new text file named fixsettings.sql, copy the following lines into it, substituting your own IP address for localhost if you want other people to connect to you:

ln -s wp-content/plugins/wp-cache/wp-cache-phase1.php wp-content/advanced-cache.php

rm wp-content/cache/*

chmod -R 777 *

Now we’ll import that into the database:

Note that you should keep that file around, because any time you want to update your local copy with the latest blog posts, all you have to do is import the database backup file, and then re-run this fixsettings.sql file to make it point locally again. Definitely makes things a lot simpler, and you can eventually schedule a cron job to backup your production blog and pull it into your local machine on a schedule.

Now you should be able to navigate to http://localhost/wordpress/wp-admin/ and login with your regular username. You’ve now got a development copy of your blog!