Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 7 of 7
  1. #1
    Senior Member shoffman3572's Avatar
    Join Date
    Jul 2008
    Location
    Fullerton, CA
    Posts
    137
    Member #
    16990
    OK - I have two web sites, and one wordpress setup/data. Site A has a Wordpress blog, everything works just fine. Site B - has a copy of all the wordpress install files, including themes etc, and because both sites are on the same server as the data, Site B does display all the same blog info as Site A. The problem is, all the links in Site B's blog point to http://SiteA/etc etc etc.

    My thinking so far has been - it must get that domain information from the wp-options mysql table - because there's a field in there called siteUrl - which is set to SiteA.

    I have added a field called SiteBurl and set that to be http://SiteB - but where in Site B's Wordpress code, do I tell it to take it's url info from SiteBurl and not siteurl ??

    In the end, both sites must display the same blog, and allow for new posts etc from either site.

    If anyone could point me in the right direction on this.... thanks.

  2.  

  3. #2
    Senior Member shoffman3572's Avatar
    Join Date
    Jul 2008
    Location
    Fullerton, CA
    Posts
    137
    Member #
    16990
    OK - I think I narrowed this down a little..

    in the link-template.php file - which is located in the wp-includes folder - there are a bunch of functions that build links based on a function called get_option() - so, get_option(home) - I think returns the url in the home field in the mysql wp_options table.

    For a test I replaced all 'home' s with 'DDSurl' and it did change the root url on all the links, but in some cases the link for incorrect - I now have to narrow down where specific links are set..

    getting closer though..

  4. #3
    Senior Member Danny[MLWA]'s Avatar
    Join Date
    Jun 2009
    Location
    Goldsboro, North Carolina, USA
    Posts
    109
    Member #
    19147
    Liked
    5 times
    The problem is, it sounds like you're using the same database.

    If not, you have about 3 things to change in order to get the new WP setup looking for the "real" directory.

    Here is how you do it:

    1.) After copying your files and creating a new database -- change your wp-config.php where it says something about BASE then /somedir/ , change that somedir to the new install.

    2.) Use Navicat or phpMyAdmin to connect to your new MySQL database. Find Site_Meta table, change any references in those rows to your new directory. Now find Site_Config table. Change all references in those rows to your new directory.

    Everything should now work fine.
    Lead Web Designer
    MLW & Associates, LLP.
    W3C Standards Complaint and SEO Friendly
    Admin of Vraul
    WordPress.org Developer

  5. #4
    Senior Member shoffman3572's Avatar
    Join Date
    Jul 2008
    Location
    Fullerton, CA
    Posts
    137
    Member #
    16990
    Thanks - but I have this working using one database..

    I created a DDSurl field in the wp-options table and set that to the domain of site B

    then - in Site B's copy of the wordpress files - I hunted down nearly everywhere the get_option() function was called - and in stead of 'home' - I entered 'DDSurl' - not totally everywhere, but enough to make sure all the blog links on Site B pointed to site B and not site A.

    Thanks for your help..

    You'll see this blog on two sites www.Danceworld.com (site A) and www.Discountdance.com (site B) in the next day or so..

  6. #5
    Senior Member Danny[MLWA]'s Avatar
    Join Date
    Jun 2009
    Location
    Goldsboro, North Carolina, USA
    Posts
    109
    Member #
    19147
    Liked
    5 times
    Awe man, you should have just parked the domain on top of the original... If you're just creating duplicate sites with different names.
    Lead Web Designer
    MLW & Associates, LLP.
    W3C Standards Complaint and SEO Friendly
    Admin of Vraul
    WordPress.org Developer

  7. #6
    Senior Member shoffman3572's Avatar
    Join Date
    Jul 2008
    Location
    Fullerton, CA
    Posts
    137
    Member #
    16990
    These are not duplicate sites though. We recently launched www.Danceworld.com - it's a dance video competition site, along with articles, blogs and forums for dancers - the other site is our company eCommerce site www.DiscountDance.com. I needed the blog I set up on Danceworld.com to work in DiscountDance.com.

    Since the two sites reside on the same server, sharing the data wasn't the issue - I just had to get the links within the blog on DiscountDance.com to point to the right domain. And change the theme so that the blogs match their respective sites layout and design.

    Thanks.

  8. #7
    Senior Member Danny[MLWA]'s Avatar
    Join Date
    Jun 2009
    Location
    Goldsboro, North Carolina, USA
    Posts
    109
    Member #
    19147
    Liked
    5 times
    I see. Would it had been better to simply set up the other WordPress site to use RSS feeds of Site1 instead of mirroring the databases?
    Lead Web Designer
    MLW & Associates, LLP.
    W3C Standards Complaint and SEO Friendly
    Admin of Vraul
    WordPress.org Developer


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 01:12 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com