Skip to content

Instantly share code, notes, and snippets.

@frankdarnese
Last active November 22, 2017 11:47
Show Gist options
  • Save frankdarnese/e0175727e8287b856950848d67241e49 to your computer and use it in GitHub Desktop.
Save frankdarnese/e0175727e8287b856950848d67241e49 to your computer and use it in GitHub Desktop.

EXPORT WORDPRESS DABATABE

SSH INTO SERVER
$ ssh www-data@{IP ADDRESS HERE}
- Are you sure you want to continue connecting (yes/no)? yes 
[email protected]'s password:

CD INTO WEBSITE REPO
$ www-data@1minus1:~$ ls 
	html mod_cloudflare
other-examples
$ www-data@1minus1:~$ cd html/

$ www-data@1minus1:~/html
RUN DB EXPORT USING WP-CLI
wp db export db.sql
www-data@1minus1:~/html$ exit
logout
DOWNLOAD DATABASE VIA SFTP (FILEZILLA), or run:
$ [email protected]: /var/www/html/db.sql ~/Desktop
DELETE DB FILE
rm db.sql
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment