Solved

Two Wordpress Installs - One Database

Posted on 2011-02-11
8
397 Views
Last Modified: 2012-08-14
Hello -

I have 2 Wordpress Installs on the same server with two separate urls pointing to each install -  the only difference between the installs is the theme (branding for two separate stations).  But the content should be the same.  It's becoming intensely arduous to have to try to update them both individually.  Is there a way that they could share posts so that if i update posts on one, it reflects on the other?

http://www.wblsblackhistory.com
http://www.wlibblackhistory.com

Thank you for any help you can provide and if you have any other questions I'm more than willing to answer.
0
Comment
Question by:vfleary
  • 3
  • 2
  • 2
  • +1
8 Comments
 
LVL 27

Expert Comment

by:Lukasz Chmielewski
ID: 34873028
How about a separate theme for each one. This seems to be the easiest way.
One installation, two designs, the same database.
0
 
LVL 23

Accepted Solution

by:
jeremyjared74 earned 500 total points
ID: 34873059
The easiest way would be to use the WordPress export option to export the pages, posts, media, comments, or whatever else you need to export. WordPress gives you the option to export you data with the following options:
By Using Start Date
By Using End Date
By Author
Categories: Individual cats or all cats
Content Types: Pages or Posts or both
Statuses: Published, Scheduled, Draft Pending or All.

You can export all of the above or select the ones you want. You can then go to the other installation to import the XML file. You then have the option to upload all the data, including downloading media or choose not to.

From the left side options menu in WP-Admin select Tools>Export. You will be prompted to download the Export plug-in. Just install it and follow the directions.
0
 

Author Comment

by:vfleary
ID: 34873300
@ Roads_Roads - not sure how I would have the one installation have 2 designs and two separate URLS pointing to each of them.  So you're kind of out of my league w/o more explanation to that.

@jeremyjared74  I'm going to give that a try - but you're saying that every time I make a change I'll have to export from one and import into another?  Just making sure I understand.
0
 
LVL 27

Expert Comment

by:Lukasz Chmielewski
ID: 34873423
No need to be rude, I was just trying to help. I must have misunderstood the question, two separate folders in the same server ? That is not a standard procedure, I think it is possible to detect the http referer and go to the proper page setting the theme for it automaticaly.
I'll try not to play in your league again.
0
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
LVL 23

Expert Comment

by:jeremyjared74
ID: 34873539
Yes it would require exporting and importing the XML files when changes are made.

Are you making frequent changes? The process is pretty simple and shouldn't take more than 3-4 minutes to complete. If you are making changes frequently and this solution isn't acceptable, maybe there is a way to set up an auto import of the posts/pages.

If you decide to continue searching for an automated procedure for importing, can you give a few more details? Are you going to be importing Media, or just posts, or posts and pages, or all of the above?
0
 

Author Comment

by:vfleary
ID: 34873683
@Roads - sorry i touched a sensitive nerve on you but I was saying that you were talking over my head... like... I am the one who didn't know enough to understand your suggestion and I was asking for a little more detail.  No tone in text.  I'm positive you have your expert status for a reason - I was just saying that I couldn't understand how to implement what you were suggesting.  Thank you.

@Jeremy - I tried this and for now? this works wonders.  Because I was really copying and pasting *headache*  I think I can use this.  Going forward if you're up to the challenge - I really  just want to import posts with images and feature images.  Everything else would be embeded - like youtube links and the like.  No real media native to wp that I'll be using for this one.  Thank you!!!
0
 

Author Closing Comment

by:vfleary
ID: 34873691
Very helpful, extremely quick and descriptive.  It's not an "automated" solution but it works great for the time being
0
 
LVL 70

Expert Comment

by:Jason C. Levine
ID: 34874031
Hi vfleary,

Even though this is closed, I have a suggestion:

What you describe is difficult to accomplish because of the way WordPress installs.  The URL of the site becomes part and parcel of the database, so merely pointing both config files to the same database wouldn't generate the expected results...images and links would go to whichever URL is defined in the config.

I can think of a few possible solutions, all a little tricky.

1) It might be possible to synchronize the content tables from one WP installation to another or do it with federated tables for the content stuff (posts, comments, postmeta, etc)/

2) You could take the RSS feed from Site A and use it to generate copies of the content in Site B via a plugin.

3) You might want to explore resetting the sites in WP Multisite config.  By running it that way you get more ability to control content for both sites from one Dashboard and there are plugins specific to WPMU that will help with this.
0

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction Since I wrote the original article about Handling Date and Time in PHP and MySQL (http://www.experts-exchange.com/articles/201/Handling-Date-and-Time-in-PHP-and-MySQL.html) several years ago, it seemed like now was a good time to updat…
Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
The viewer will learn how to dynamically set the form action using jQuery.
The is a quite short video tutorial. In this video, I'm going to show you how to create self-host WordPress blog with free hosting service.

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now