Question

How do I find my Wordpress files and database?

I need to access my Wordpress Files, and my Wordpress Database. I have already switched my DNS to another host and built the site on another IP.

Now I need to get something from the old database.

When I login to the Digital Ocean, there is no link which I can click which allows me to see my FILEZILLA ftp login details, and no way to see the mysql 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.

Hello @mywebguy

You can check our tutorial on How to Transfer Files to Droplets With FileZilla

https://docs.digitalocean.com/products/droplets/how-to/transfer-files/

You can access the database using any MySQL client. Another thing is to directly import/export your database. We have this process covered in an article as well:

https://www.digitalocean.com/community/tutorials/how-to-import-and-export-databases-and-reset-a-root-password-in-mysql

Regards

Hi @mywebguy,

If you are using FileZilla, you need to use a user on your Droplet, let’s say root with your SSH key.

Now, the WordPress files can be in a lot of different places. To do find out where exactly they are, you need to SSH to your Droplet and type in the following command:

  1. netstat -tulpen | grep 443

Depending on the result, it might be Nginx or Apache2, you’ll need to enter the following directory:

If Apache2:

  1. cd /etc/apache2/sites-enabled

If Nginx

  1. cd /etc/nginx/sites-enabled

In One of the above folders, you should see a config file for your Droplet, cat it to check its contents. In there you should see the root/homedir of your Website.

As for your MySQL, you just need to dump the data from your Database. Once you are in your WordPress directory, you can check your DB credentials from the wp-config.php file.

Once you know them you can just dump the Database with the following command:

  1. mysqldump -u DBUser -p DBName > wordpressdb.sql

Where DBUser and DBName are the ones you saw in wp-config.php.