I'm working on a site that will be changed incrementally (i.e. first the new Homepage will go live, then product pages, then contact, etc). It will not be a switch-flip, wholesale changeover between the two sites.

The old version is built on WP and the new one will be too, but I don't want to use the old files and install, but rather want to start with a fresh install. What are my options for having them coexist on the server and have some pages served from one install and some from another?

This is not a multisite setup as both sites will need to use the same domain.

  • Hi and welcome. This topic has been covered before. Take a look at this search query. – brasofilo Jan 22 '13 at 17:43
  • Nope, this is not what I am looking for. Did you read the question? BOTH sites will be live on production concurrently. – theflowersoftime Jan 22 '13 at 18:00

Have you thought about doing this with per-url redirects? I found something promising here: http://www.phpin24.co.za/apache/apache-change-documentroot-for-a-specific-url/

It seems to boil down to this (copied from the linked page):

<VirtualHost *:80>
    ServerName www.phpin24.co.za
    DocumentRoot /var/www/html/phpin24

    AliasMatch ^/enquire-now/thankyou/(.*) /var/www/html/other-code/app/webroot/$1
    AliasMatch ^/enquire-now/(.*) /var/www/html/other-code/app/webroot/$1

    ErrorLog /var/log/httpd/phpin24/phpin24_error_log
    CustomLog /var/log/httpd/phpin24/phpin24_access_log combined
    <Directory /var/www/html/phpin24/>
                Options FollowSymlinks
                AllowOverride All
                FileETag none
| improve this answer | |
  • It will be a lot of work to do it for each URL, unless the site is trivial, and how do you perform a search? – Mark Kaplun Jan 22 '13 at 19:21
  • Why a lot of work? You don't have to catch each and every possible URL there might be, just the "branches", like /products, /articles etc. It should be feasable, even with more complex pages. Though I really don't know the setup … The search thing is of course something that might prove to be more difficult. – maryisdead Jan 23 '13 at 7:45
  • The question didn't specify the granularity of the increment. It is possible that he has 500 pages at root level, and with your solution for each page he will have to edit the apache configuration. – Mark Kaplun Jan 23 '13 at 10:37
  • This might work...the number of URLs is pretty minimal. My concern with this is what happens to images/scripts when a specific WP installation calls for them? – theflowersoftime Jan 28 '13 at 15:27
  • I also don't need search functionality thankfully. – theflowersoftime Jan 28 '13 at 19:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.