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.

KFSys
Site Moderator
Site Moderator badge
September 8, 2022

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.

alexdo
Site Moderator
Site Moderator badge
September 8, 2022

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

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

card icon
Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Sign up
card icon
Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We’d like to help.

Learn more
card icon
Become a contributor

You get paid; we donate to tech nonprofits.

Learn more
Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow – whether you’re running one virtual machine or ten thousand.

Learn more ->
DigitalOcean Cloud Control Panel
Get started for free

Enter your email to get $200 in credit for your first 60 days with DigitalOcean.

New accounts only. By submitting your email you agree to our Privacy Policy.