Im installing Wordpress Using EasyEngine, How I backup my database, when My site has been take down by DMCA in Digital Ocean

My site got hit by DMCA and badly I didnt know until I see my site was down, Im planing to move my site to another hosting, but how do I backup my wordpress database and download it, wp file already succeed being backup, but I cant dump any database

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Since you’re using EasyEngine (v4.x, I assume) you could just use the wp-cli shell to backup your database.

First bring up the shell: ee shell SITENAME

(Note, If you don’t recall the SITENAME you used when setting up EE, use this command, ee site list.)

Once you are in the wp-cli shell, you can use wp-cli commands. In your case you’ll need to use, wp db export A-FILE-NAME.sql

Personally, I use something like this, wp db export ../backups/wp-dp-bak-$(date +%Y%m%d-%H.%M.%S).sql

That will place the file into a /backups/ folder (which you’ll need to first create whilst in the shell (use mkdir ../backups). And it will name the file with a date-time stamp.

This provides a very easy way to do the backup you want to do.

Note: If you create a backups folder, don’t do this until you are in the ee shell. Otherwise it will likely be owned by root, and the shell won’t have permission to access it.

Hey @KDSys,

Thats it, I’m already see my wp-config configuration which is:

/** The name of the database for WordPress */
define( 'DB_NAME', 'taruhaneuro2020_com' );

but when im using

mysqldump -u root -p taruhaneuro2020_com > databasebackup.sql

its give me this error

mysqldump: Got error: 1049: Unknown database 'taruhaneuro2020_com' when selecting the database

Hi @caknoris696,

I’m sorry to hear that, can you confirm exactly what happened, maybe we can remedy the situation somehow?

As for the Database backup, it should be fairly easy. Find your DB credentials which should be located in your website’s wp-config.php.

As soon as you do, executing the following command

mysqldump -u username -p database > databasebackup.sql

As soon as you hit enter, you’ll be asked for the Database’s password.

Regards, KDSys