Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

WordPress Local WordPress Development Local WordPress Development Migrating WordPress from Local to Live Server

Using a subdomain to go live and FTPing files

2 questions

I am new at developing, so keep in mind some of the terms I use may be incorrect. Bear with me!

When I am about to FTP files into the public_html folder of my subdomain, I notice that I can see all the WordPress files from my main domain. How does the host/server know which files to access and serve? Does it have something to do with the database?

Also, when I FTP the files, does it matter if I FTP a folder/directory with all the WordPress files, or do I need to select all the files? Will the server/host be confused if the WordPress files are inside of a directory(which would be inside of public_html)?

Thanks for the help!

David Richied
David Richied
18,057 Points

Hi Johnny,

I am not sure what you mean by subdomain, but your public_html folder is your main domain. By default, if someone goes to yoursite.com, they're directed to the public_html folder. To answer your first question, the host/server doesn't know which files to show (it goes to public_html by default). You have to specify which folder to go to in your URL. If you copy a folder called yourfolder with all your WordPress files into public_html, you'll have to type yoursite.com/yourfolder to get to that WordPress site. That also answers your second question. You'll have to copy all the files (and folders) of your WP site to the public_html file; otherwise, you'll have to type yoursite.com/yourfolder to get to the WP site. If you want to delve further into getting better at uploading your files to a server, I made a tutorial that has a lot of good links to other helpful tutorials, but be warned. It can get confusing, and it might take many days to figure out. It basically explains how I edit my local WP site and update it live.

http://davidrichied.com/2015/11/21/creating-a-local-wordpress-site-and-pushing-it-live-via-github-newbies-welcome/

I hope I was able to help. :D

~David Richied