Backup WordPress site using Dropbox and wp-cli ?

Here is how you can backup small site using wp-cli and dropbox.

Go to:

Create new app call it anything it’s gonna be your private app.

Generated access token and save it somewhere in your locker ūüôā

Download file and change directories path and DROPBOX_TOKEN

sudo chmod +x

Setup crontab with crontab -e add following line there

0 5 * * * /root/ > /dev/null 2>&1

This will backup site everyday at 5 am.


  • This scripts assumes your installation will be under if not it’s time to fork this and modify script.
  • This will backup your WP tables and wp-content folder.
  • You can also change path of
  • You should clean up your dropbox folder before you run out of memory.
  • Modify crontab if you want to change backup interval to less frequent or more frequent.


Hello world!

My name is Utkarsh Patel (same as domain name no cheating) and I am WordPress Engineer. I also like to play with servers (DevOps maybe?).

This is my first blog. I’ve not decided to write a blog every x day or something which most people do.

Mostly, Blog will be on WordPress, JavaScript and Stuff which I find interesting.

To start with here are/were my favourite blogs on WordPress