# If you have multiple folders with WordPress sites, add/remove them from this arrayĭirectories=( "wp_folder_1" "wp_folder_2" ) # Directory that holds your WordPress sites' root folders This will create an unsaved file called backup.sh, which you should paste the following content in (don’t worry if you don’t understand everything, I’ll explain what it does after the snippet): #!/bin/bash Now that we have our necessary token, let’s SSH onto the server and create a file, preferably somewhere in the $PATH: $ sudo nano /usr/local/sbin/backup.sh That’s it, save/copy the token and close the tab, you won’t need it anymore. Once your app is created, you need to generate an OAuth 2 access token (on the app page you just created), which you’ll need in the custom shell script we’re about to write. To do so, visit Dropbox App Console and create a new application and select/insert options similar to the following screenshot: Drobox developers screen In order to access Dropbox via their API, you first need to create an application. Lastly, if you have multiple WordPress sites to backup, they should all be in the same folder, like /var/for this to work (don’t worry if you don’t, though). Also some basic linux shell knowledge is required, although nothing complicated, and I’ll explain each step in detail. ![]() ![]() This tutorial assumes you have your own VPS (shared hosting won’t work as you need WP-CLI installed, but for those with the technical skills it should be easy to adapt the script we’re going to use. Although there are many services and plugins that allow you to backup WordPress site (usually for a small fee), the easiest way to get going is to simply upload a compressed file of your WordPress files and database to your Dropbox.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |