• Hi,

    I have an existing WordPress which sits inside a sub-directory of my root, with the index.php in the root. I’m trying to find a way to work on my new site in a different sub-directory (so I can just update the index.php to swap them over when its ready), but it doesn’t seem to be working. I’m guessing this is because the index sits ‘above’ my /2015 sub-directory?

    Does anyone know a way that I can keep my /2012 site up and as it is, while working on my new site (both WordPress) in the /2015 folder?

    This is the structure I was hoping to work with:

    index.php
    2012/oldWordpressInstallationHere
    2015/newWordpressInstallationHere

    Any help with this would really be appreciated as its been driving me mad!

    Tom

Viewing 11 replies - 1 through 11 (of 11 total)
  • Moderator James Huff

    (@macmanx)

    Volunteer Moderator

    Yes, don’t run a separate site in a subdirectory, that will only lead to pain and suffering.

    Instead, create a subdomain in your hosting provider’s control panel and build your development site in the subdomain. This way, the site will operate independently and won’t be affected by the live production site.

    Thread Starter TomWD

    (@tomwd)

    Thanks for the quick reply James, I’ll take a look at that and see how I get on!

    With a sub-domain would I still be able to replace the existing index.php and update where it points to? Sorry, still a bit new to the technical side of this…

    Thanks again,

    Tom

    Moderator James Huff

    (@macmanx)

    Volunteer Moderator

    Well, you wouldn’t be moving just the index.php. That file is nothing more than a literal index, a map, to other files which make it up.

    What specifically are you trying to accomplish?

    Thread Starter TomWD

    (@tomwd)

    Well at the moment I have an existing site that is a WordPress, that sits in a sub-directory of my root. I need to create a new site (also a WordPress), that I can customise and test within the same space, without affecting the existing site. Then when the new site is ready I’m looking for a relatively painless way to swap them over. I’ve read about .htaccess rewrites and WordPress multi-site etc, but I can’t work out what the best option is for this situation?

    Thanks again for your help.

    TomWD,

    Sub-domains are helpful as James indicated. However, as an extra added note, you may want to check with your hosting provider to see if they provide a staging area for WordPress. I know that my site hosting company Siteground offers this in their upgraded hosting package. Just an idea for you!

    Several other WP hosting companies offer that as well. It allows you to have a development area and then you can push it live at the click of a button.

    Thread Starter TomWD

    (@tomwd)

    Thanks Greg, that would be perfect if they do. I have a fairly basic package so they may not, but definitely worth checking out.

    TomWD,

    If your hosting package does not support this, may I recommend that you check into a plugin called Backup Buddy. It will allow you to move files between your live site and your development area.

    Would make creating a duplicate copy of your live site easier and then taking elements from your development area to your live site. If that made sense.

    Moderator James Huff

    (@macmanx)

    Volunteer Moderator

    Ok, if you’re talking about customizing the look of the site, then you’ll be moving over the whole theme, not just its index.php file. 🙂

    If all you’re doing is tweaking a theme, then you don’t need a staging area. A staging area is nice, but moving over the theme just involves moving the directory via FTP or SFTP.

    Thread Starter TomWD

    (@tomwd)

    Ah, yes sorry I don’t think I worded that too well. I was hoping I could, in this order:

    1) Keep index.php in the root and my current site in /2012 sub-directory
    2) Build and test the new site in the /2015 sub-directory
    3) Update the index.php, and WordPress url (in settings) to point to the new site, when its ready.
    4) Relax and enjoy my new site for a few years!

    I’m pretty sure from the replies so far that this isn’t going to work though!

    Moderator James Huff

    (@macmanx)

    Volunteer Moderator

    Yeah, I wouldn’t do that, that’s a bit messy. 🙂

    If all you’re doing is customizing the theme, just move over the customized theme to the production site.

    I want to thank you all for a helpful discussion.

    Based on your advice, I was able to setup a subdomain on my server and clone my site to the subdomain.

    I added a subdomain through cPanel. I then (after backing up) used the softaculous application for wordpress to clone my site.

    This took me about 5 minutes! The clone installed on the directory of my choice, which, in this case, was my subdomain (erased the dir for directory installation).

    So, on the main domain, I have a “coming soon” type of message while I work on the staging site I created. I asked my hosting service….they did not seem to think they had such a service separate from the proposed solution above.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Installing 'dev' Worpress in sub-directory of existing WordPress?’ is closed to new replies.