Easiest way to setup and test before going live

Hello, I’m new to this community and looking forward to participating!

I consider myself just above a beginner with WP. I’ve created 6-8 basic sites in the past but have always just built them live. I’m embarking on a more complex membership site now and would like to know the best/easiest way to build and test the site prior to launching it live. I’ve researched methods for both creating separate directories off the / in your hosting account and doing it there, them moving to / when you’re ready, vs building it on a local machine then uploading everything when you’re done. My biggest concern is the complexity of the database issues and ensuring all links remain intact. I’m not an experienced sql or wp database person. Any suggestions would be greatly appreciated!

Kindest Regards,


  • Alexander
    • DEV MAN’s Mascot

    Hi @dave,

    The biggest challenge when moving a site is the URL changing. WordPress stores this in a setting called the site URL. Fortunately, all the other links are generated automatically so unless you place hardcoded links in yourself, you won’t have anything else to worry about.

    When you go to move the site, you can actually change this setting right from your WordPress dashboard. Just change it to the new URL, and save. This will break the front end of the site for your staging area, but when you backup and restore (or move) to the new URL, it will start working again.

    Another option would be to move the site, and modify the site URL settings in the database.

    And finally, if you’re developing locally, there’s a nice trick that can save alot of trouble here. You can modify your computers host file to make it believe the domain is pointing at your development environment. This way you can build the site locally and still be accessing it from the actual domain name.

    For example, you can add this to your host file.


    Now when you visit “yoursite.com” your computer will pull up your local development server. When you’re finished you can upload the website, and remove that host file entry. Then it will be online, but at the same domain it was developed with.

    Let me know if you’re on windows/mac and I can get more specific instructions on the hosts file method if you like.

    Thanks for being a WPMU DEV member. Let us know if we can be of any further assistance.

    Best regards,


  • Elliott Bristow
    • The Bug Hunter

    Hi Dave,

    Welcome to the forums!

    Different people choose to handle this different ways. I’ve tried both ways (building locally then uploading and building on a sub-domain/floder and transferring). My preferred method is to build locally and upload, but transferring the SQL database would depend on how your local machine is configured, and this could affect your decision.

    For example, if you are using WAMP, LAMP, MAMP or some other kind of pre-build hosting system on your local machine, these tend to come bundled with phpMyAdmin which makes transferring your database really easy… you just export the whole thing as SQL, then import it to the live site when you’re ready. You will need to change the settings table to reflect the new site URL, and you’ll have to do the same in the wp-config.php file, but these changes are easy to make.

    After uploading WP via FTP (and editing your wp-config.php for the new site address), everything should be ready to go.

    Of course, this is just my preferred method, I’m sure others may prefer other ways (site migration tools and the like), and hopefully some will chime in with their ideas on this thread.

  • Dave
    • Flash Drive

    Elliot, Alexander,

    Thank you both so much for the prompt response!

    I am a full Mac shop. My host is through GoDaddy with Linux. What local host software would you recommend? I’ve heard a bit about LAMP but am having a hard time finding a link to it? I see WAMP, and MAMP, but not LAMP?

    Also Alexander, if you can provide any specifics on the local host config that would be great. I like that concept very much!



  • Alexander
    • DEV MAN’s Mascot

    Awesome, Mac makes it a bit easier (I use a Mac for everything, so there’s more experience to draw on I suppose)

    For hosts file management on a mac, I’d recommend this little app: https://code.google.com/p/gmask/

    Up until a few months ago I had actually been manually changing the hosts file, but @jack Kitterhing showed this app and I’ve been hooked ever since.

    For local development, LAMP/WAMP/MAMP are very close to identical. LAMP is an acyronym for

    Linux Apache MySQL PHP

    It refers to the most common core components of a web server running PHP applications.

    In a live production environment, you’re almost always going to be running linux. Your webhost basically has a LAMP stack setup for you with tools in place to get your application running.

    WAMP and MAMP are usually for local development versions, and are simply to be installed on Windows or Mac respectively.

    So for local development on a Mac, you could use MAMP. :slight_smile: You’d then have direct access to everything as it will be running on your local machine.

    For a fast all in one solution, you could checkout bitnami stacks. There’s even one you can install directly from the mac app store. This is actually what I’d recommend trying out first.


    So give some of it a try, and let me know if I can be of any further assistance.

    Best regards,

  • Dave
    • Flash Drive

    Thank you Alexander!

    I was able to download the bitnami WP stack and get it installed along with the Theme that I will be using. I also downloaded the gmask app for host file management. I hate to be-labor this thread but I have a couple of questions to ask before I get started as I want to make sure I’m starting from solid ground.

    1) Regarding the host file;. I added the following line using gmask to my host file;


    MedMalSource.com is the domain I will be using. When I go to that domain on the system it now says it cannot find the server. I did reboot my system after making the change. Is there something else I need to configure for this to work? When I launch bitnami, I see the following URL bar when accessing my local WP install;


    I am able to login to the admin panel at localhost:8080/wordpress/wp-login. Perhaps I screwed up when setting up the WP location on the bitnami setup?

    2) Regarding permalinks, I do want my post URL’s to be named with the post name, is it appropriate to select “Post name” in the Permalink settings or do I need to do something different? Not sure if this has implications for when I go to move the site live?

    3) Finally, before deciding that I needed to setup this site locally, I loaded and configured WP 3.6 on my hosting account and installed the basic theme. Do I need to remove this prior to my online migration? Not sure how the admin user will be affected? Does the admin username/password need to match on my local system to that of my hosting account?

    Again, sorry for all the questions. I appreciate your guidance!


  • Dave
    • Flash Drive

    Alexander, any chance you can give me your thoughts on the questions above? I’m wanting to make sure I avoid big mistakes with my local development that will haunt me when I go to move the site online and live. Thank you!

  • Alexander
    • DEV MAN’s Mascot

    Hi @dave,

    Sorry for the delay. Sure, here we go:

    1. The hosts file method works when set the domain as the site URL during the site install. Looks like bitnami did this for you. You can try going to the Settings -> General and changing the URL back to that domain.

    However, because it’s already set this way, there really isn’t an advantage to changing it now, as you’re going to need to change it when you migrate the site to the new server anyway.

    Also, this won’t change the port number that the site is being served on, so you’ll need to access it via MedMalSource.com:8080/

    2. You can do permalinks however you want. Post name is usually the best option. If you’re going to be making hundreds of blog posts, there’s a performance advantage to using a structure with month/day but it doesn’t affect sites that have an average amount of content.

    3. If you want the exact same site you’re working with locally to be online, you don’t want WordPress already installed on the server. When you’re ready to launch, you would upload the site files with FTP to the root of the site. You would need to create a new database and database user on the server though. Then you’d need to export your database from the local machine and upload it to the server. Finally, you’d modify wp-config.php to use the new database username/password.

    Best regards

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.