Where is the wordpress database in my droplet?

Posted December 3, 2021 96 views

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

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.

Submit an Answer
1 answer


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!

by Jon Schwenn
Use MySQL Workbench to connect securely to your remote MySQL database using SSH.