Web Design Forums

Wordpress Help

Wordpress is a blog software that is also often used as a CMS, with plentiful themes and add-on modules, and an easy-to-use admin interface, it's great for simple sites!

2 Domains 1 Wordpress



Site of the Month Voting - Now Open. CAST YOUR VOTE NOW!

Reply
 
LinkBack Thread Tools
Old October 14 '09, 10:53 AM (#1)
shoffman3572 is offline
WDF Regular
 
shoffman3572's Avatar
 
Join Date: July 2008
Location: Fullerton, CA
Posts: 117
shoffman3572 is an unknown quantity at this point
2 Domains 1 Wordpress

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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old October 14 '09, 12:23 PM (#2)
shoffman3572 is offline
WDF Regular
 
shoffman3572's Avatar
 
Join Date: July 2008
Location: Fullerton, CA
Posts: 117
shoffman3572 is an unknown quantity at this point
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..
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old October 15 '09, 03:17 PM (#3)
Danny[MLWA] is offline
WDF Regular
 
Danny[MLWA]'s Avatar
 
Join Date: June 2009
Location: Goldsboro, North Carolina, USA
Posts: 109
Danny[MLWA] is on a distinguished road
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old October 15 '09, 03:52 PM (#4)
shoffman3572 is offline
WDF Regular
 
shoffman3572's Avatar
 
Join Date: July 2008
Location: Fullerton, CA
Posts: 117
shoffman3572 is an unknown quantity at this point
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..
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old October 15 '09, 04:01 PM (#5)
Danny[MLWA] is offline
WDF Regular
 
Danny[MLWA]'s Avatar
 
Join Date: June 2009
Location: Goldsboro, North Carolina, USA
Posts: 109
Danny[MLWA] is on a distinguished road
Awe man, you should have just parked the domain on top of the original... If you're just creating duplicate sites with different names.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old October 15 '09, 05:29 PM (#6)
shoffman3572 is offline
WDF Regular
 
shoffman3572's Avatar
 
Join Date: July 2008
Location: Fullerton, CA
Posts: 117
shoffman3572 is an unknown quantity at this point
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old October 17 '09, 02:43 PM (#7)
Danny[MLWA] is offline
WDF Regular
 
Danny[MLWA]'s Avatar
 
Join Date: June 2009
Location: Goldsboro, North Carolina, USA
Posts: 109
Danny[MLWA] is on a distinguished road
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?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

  Web Design Forums » CMS Help » Wordpress Help

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Wordpress Theme Tutorials pacificstorm General Web Design Discussion 2 December 11 '07 05:23 AM
[Request] Wordpress Theme that looks like beryl-project.org/ amcdeathknight General Web Design Discussion 1 September 12 '07 12:05 AM
Designer needed for WordPress Theme IrishLadd For Hire / Wanted 0 July 17 '07 03:28 PM
wordpress Kayo HTML and CSS Help 1 March 5 '07 02:58 AM
Hosting and Domains JR Server Administration Help 15 October 18 '03 12:26 PM

 
User Infomation
Your Avatar

Site Of The Month
Nominate Your Site Now!

Advertisement
WolfCMS.org

Latest Articles
- by RickM
- by bfsog

Advertisement

Partner Links



All times are GMT -4. The time now is 02:00 PM.


WebDesignForums.net is Copyright © 2010 RikeMedia.

SEO by vBSEO

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164