• Hi, I have a simple WordPress website running live now.

    I have now developed a new WordPress website on my hard drive using Xampp. This has all been a steep learning curve since I’ve never done any of this before.

    Now I want to upload it to a subdomain (as suggested by my hosting co help desk) so I can test that it all works ok before I go live and replace the old site. So I have transferred my files to httpdocs in the subdomain; edited my wp-config file; exported my database from localhost using wp-migrate-db then imported it to the new database I created on the host server. I’ve done this countless times and have not been able to make it work yet! Clearly I am doing something wrong.

    1. I’m not sure I have the right path specified in wp-migrate-db’ for the site files. Can I get some advice on how to work this out please?
    2. what should .htaccess contain (it currently refers to my C:/ drive subdirectory), or should I just include a “no rules” .htaccess file as exists on my main domain for the existing site?
    3. My database exported by wp-migrate-db still contains some references to the Xampp sub-directories on my C:/ drive – that seems weird to me. Could that may be the problem. If so,how do I fix it?

    My only alternative is to take down my existing site and upload the new site. I feel this might be easier, and I guess I can always reinstate the old site if the new one doesn’t work.

    Sorry, I can’t provide a link because the site lives on my hard drive.

    I would be very grateful for your advice and assistance.

    Cheers
    Paul

Viewing 5 replies - 1 through 5 (of 5 total)
  • Several points here, so I’ll do them in multiple posts, as they take time to research and type.

    This is the official documentation on Moving WordPress, which is what you are doing when you go from XAMPP to a subdirectory:
    http://codex.wordpress.org/Moving_WordPress

    Depending on your background, you may find this plugin a lot easier than doing through all the steps in the documentation:
    http://wordpress.org/plugins/duplicator/

    This is also something to think about:
    https://codex.wordpress.org/Giving_WordPress_Its_Own_Directory

    It allows you to quickly switch from one WordPress install to another, with next to no downtime on your live site.

    For single site WordPress installs, I always install into a subdirectory, then use this technique to make it look like it is installed in the root of the domain name, so you just type the domain name to see your WordPress site.

    When I want to test a new WordPress install, I install it in another subdirectory. And, when it is ready to go live, I simply change index.php in the Root (and a couple of other steps) to point to a my new subdirectory, and I’m live with the new one.

    OK, that covers it. Except to say that the approach I’m talking about also allows quick backouts if things don’t work properly.

    The only time that this doesn’t work as well as it does for me is if you have a site with lots of changes made every day, especially when they are made by many different people. Those changes will get lost, especially when you backout after some period of time.

    Thread Starter ChoicesNZ

    (@choicesnz)

    @jonradio, thanks very much I will study these alternatives and give it a go, before the weekend I hope!

    Cheers
    Paul

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Upload Site to subdomain for testing’ is closed to new replies.