Where is the wordpress database in my droplet?

I am trying to upload my wordpress page created locally and I don’t know where the database created in the installation of my wordpress is located in the droplet to replace it with a database of my website created locally. Can someone help me please? Thanks

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.


There are a few ways of accessing your database hosted on your Droplet:

  • You can access it via the command line with the mysql command:
mysql -u your_user -p 

Note that you need to be connected to the Droplet via SSH in order for the above command to work.

  • Or alternatively, you could use a MySQL client installed on your laptop like WorkBench for example. You can follow the steps on how to set that up here:

What I would personally do is to first create a new blank database with a new user, then I would import the database from my local laptop to the new database and finally, I would update my database details in the wp-config.php file with the newly created database details.

Let me know how it goes! Best, Bobby