• Hello Everyone,

    I’m trying to set up a local dev environment so that I can edit my site and preview it without actually having to upload to the site and waste my bandwidth and destroy the user experience. I’ve got a few questions.

    1. I have the database set up on my local system. It’s named the same name, the user and password are exactly the same, and I can connect to it through the mysql client. However, when I change the wp-config.php file to reflect localhost rather than the db server that 1and1 provies, I get an error while trying to connect to the database. Why is this?
    2. Is this even the best way to do this? I mean, changing the DB_HOST in wp-config seems a little extreme and non-transparent. However, this is the best I could come up with. Suggestions are welcome.

    Any thoughts?

    Thanks in advance!

    Timmy V.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Do you have the tables and stuff in the database though?

    Thread Starter stopsineman

    (@stopsineman)

    Hey haochi,

    Sorry for the laxness in my reply. I don’t get why WordPress doesn’t automatically inform me through e-mail when someone responds.

    I believe the answer to your question is yes. I have run the backup sql script from the site on my local environments database. Both are MySQL 5 and all of the schemas and even the data are there.

    Does that help at all?

    Thanks!

    Timmy V.

    Thread Starter stopsineman

    (@stopsineman)

    Anybody have any ideas here? This has to be something that people have done before, I’m sure its even been documented, I just am having trouble finding it. Some help would be greatly appreciated.

    Thanks in advance!

    Timmy V.

    Well we support WordPress here, not server configurations. It sounds like you need to finish configuring your local server to connect php and MySQL.

    There are some easy ways to go about a local dev environment and tons of how-to’s. Here are two:

    https://www.tamba2.org.uk/wordpress/xampp/
    A 4 part series (yes, I’m self promoting :-p )

    Xampp and Wampserver are common packages used for this in the windows world. Mampp for Macs (I think).

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Setting up a local dev environment’ is closed to new replies.