Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

WordPress

Chase Lester
Chase Lester
10,972 Points

Downloading already developed Wordpress site to work offline with?

I am not a WordPress developer so I am not sure how to do this. But, I have a client who is looking to update their WordPress site. I have been able to do some of the stuff online, as in switching photos and such, and adding a few things into code, however, some of the things he is asking now, is nearly redeveloping a page. Which would be much easier to do locally offline and then push it back online after it's done.

My question is, how would I go about downloading his site locally to my computer for development, which will have the css and html files to work on? I have watched some of the local development videos, but what I did see was just about downloading WordPress to your computer for local development of a site that is not already existing. Is there a way to do this?

2 Answers

Julian Gutierrez
Julian Gutierrez
19,201 Points

This process is quite involved but definitely doable. A search on moving a live site to a local server will probably be able to provide more detail but I'll summarize the process below.

  1. Make a copy of your live database. This will be an .sql file which you can get by exporting your database in phpmyadmin on your live site.
  2. Make a copy of all your wordpress files and folders on live site. Can be accomplished by downloading your files through ftp.
  3. Setup your local development using MAMP, WAMP, etc.
  4. Copy/Paste wordpress files and folders into your local server folder
  5. On your local development site create a database and import your live database (.sql file) .
  6. Update your server information (db name, db username, db password, etc) on your wp-config.php with the info used when making your local database.
  7. Although your database is populated the url's are still pointing to your live site and will have to be updated I personally use a search and replace script like interconnectit's Database Search and Replace Script in PHP.

There are plugins to help with backing up your live site but I can't personally vouch for any.

Andrew Cato
Andrew Cato
4,263 Points

The Dupicator plugin takes care of everything for you. Just note what your database name, username, and password are, as well as if you're going to install a new database or overwrite an existing one.