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 Installing WordPress Locally

I already did a "one-click install" of Wordpress

I already installed Wordpress for my website.

I'm following along on Local Wordpress Development and I am installing Wordpress on the local server but the page I reached looks like we are starting from scratch. Is there a way to port everything I have already done or just log into the site I already created?

4 Answers

Thanks Kevin and Raymon. You guys have pointed me in the right direction for sure, I just could not get it to work despite adding those changes. I finally went a different route and downloaded the Duplicator Plugin https://wordpress.org/plugins/duplicator/ and followed the steps on this video https://www.youtube.com/watch?v=S2NMy01bhA0 . Everything works now. Thank you for your help!

Kevin Fitzhenry
Kevin Fitzhenry
30,096 Points

cameron eckelberry Are you using MAMP? You can change the files you are working with inside of MAMP Preferences > Web Server > Document Root.

If you have the root folder for things you've already done, you can select that folder, and work with those files.

Hey Kevin, Ok so I was able to copy all the files into there but now when I try to access it, it says, "Error establishing a database connection." Any more advice?

Oh and yes I am using MAMP

Kevin Fitzhenry
Kevin Fitzhenry
30,096 Points

cameron eckelberry That error message could be happening for several reasons.

Check out this article for troubleshooting the issue: http://www.wpbeginner.com/wp-tutorials/how-to-fix-the-error-establishing-a-database-connection-in-wordpress/

If you still can't get it to work go ahead and post again to this thread. Good luck!

Raymon Oleaga
Raymon Oleaga
19,298 Points

It's exactly what it says is having problems connecting to the database.

  1. go to your wp-config.php file and make sure the name - user - password are correct.

  2. in about line 33 of the same file fin where is says

    define('DB_COLLATE', '');

under this add

  define('SITE_URL', 'http://url-where-your-local-site-is');
  define('SITE_URL', 'http://url-where-your-local-site-is');

Make sure their are not any trail slashes at the end of this URL

  1. go to Phpmyadmin -click on the database you are using -then click on the options. You will see something that says "site url" and "home" make sure that url are correct just like in the previous file.

Hope this helps!