WordPress multi site installation - php

i have 3 self hosted wordpress sites in same machine but each one uses different url as explained below.
publication.mysite.com (wordpress site)
info.mysite.com (wordpress site)
flipbook.mysite.com (wordpress site)
now mysite.com is our primary company's website. it is a sharepoint site. because of this i cannot create mysite.com as our primary wordpress site.
i want to keep publication.mysite.com as our primary wordpress site and under this site bring the other 2 wordpress sites (multi-installation).
below is what in am trying to accomplish.
all 3 sites should consume it's own mysql database
all should be pointing to it's directory
all 3 sites url should not changed.
all posts, and other data in all 3 sites must be retained.
how could i do this? i tried to follow wordpress multisite installation documentation but i am stuck because i do not know how to setup as per my domain requirement.
another reason why i want to do this because of search. i have a global site search plugin from wpmudev. we need the ability to search from any one of our site to other 2 sites. for example: if i am searching for a 'productA'in one site, i need to display all post related to 'productA' from other 2 sites as well.
if there is any better way to perform global search like i explained, then i would like to hear about it
Thanks for help.

Your network-wide search functionality will be difficult to achieve if you must use separate databases for each site. It will require development chops that most people don't have. I respectfully suggest you reconsider that requirement.
Multisite search, in a single database, can be done with a plugin. For example. https://wordpress.org/plugins/multisite-global-search/
A WordPress multisite installation is designed to host sites with varying URLs. The migration isn't hard to do. You set up the target multisite system with three sites (blogs, WordPress's documentation calls them) in it. Rig the URLs for each of them.
This document explains the path to follow. https://codex.wordpress.org/Create_A_Network Multisite's administrative menu offers ways to configure the individual sites.
You then export the content from the individual sites and import them, one by one, into the target sites.
WordPress is decently well documented. Read this for an outline of the process of migrating to multisite. https://codex.wordpress.org/Migrating_Multiple_Blogs_into_WordPress_3.0_Multisite

Related

Wordpress - 2 other sites in same theme

I've got wordpress site with installed theme. I want to create 2 sites with same theme, just differs only subdomain and menu and index page (just specific "page" in wordpress). How to resolve this? Multisite in wordpress or some other simplest way (or maybe multisite is the simplest way to do this)?
I've never used the WordPress multisite feature, but here's a good reference: https://codex.wordpress.org/Create_A_Network.
A multisite network is a collection of sites that all share the same
WordPress installation. They can also share plugins and themes. The
individual sites in the network are virtual sites in the sense that
they do not have their own directories on your server, although they
do have separate directories for media uploads within the shared
installation, and they do have separate tables in the database.
From this point of view, I think it is the simplest way of implementing the same theme in both sites. Also, if you install WordPress in two different folders of the same server it will be considerably slower than if you use multisite.

Determine locale by domain - Wordpress

I am pretty new to localization. Having never had to build multilingual site, I have never built something to serve a specific language.
We currently have example.com, example.co.za and example.gr. Our Wordpress site is hosted on example.co.za in English and is served to all 3 domains in English. We want, when a user hits example.gr, to serve a Greek site. But, we only want one Wordpress site that we update and maintain. I understand that we will need to translate our content into the languages we require, but that's not an issue.
Based on the above, I have a few questions.
What would be the best solution for this?
Is it possible running 1 WP instance and achieving this, and how would I do it?
Is there a way that I can change locale by checking which domain was requested?
You can use a translation/multisite plugin like MultilingualPress Pro, they link several blogs together and help you with translating etc.
Use a multisite install, every language is an own blog (they can be duplicated with this plugin for example) and can be managed independently, but they all get connected through 1.
You could, but 1. for example automatically detects and redirects based on the browser language, which seems to me like a better solution. This works fine for me in a similar environment.
(I am in no way connected to the linked, paid plugin, but I am using it in two sites and am fine with the work it does.)

Display articles from other Joomla site

I have 13 sites in Joomla installed on one server.
One main site + 12 other sites.
Each site is a diffrent Joomla installation (based on the same template etc.)
Now I need to display news from Main Site in Other sites.
I'm thinking about:
Do this by RSS but I have a news slider and it doesn't support RSS chanles.
Make PHP script, when I inserting article on main site, insert article directly to databases of other 12 sites.
Make custom script to parse content from main site and load like news in other sites.
Do you have any ideas? How to do this?
If all of the website databases in question are on the same server I would directly query the relevant tables instead of going through all the trouble and overhead of setting up 12 different RSS feeds. This is assuming there is no other business need to implement those feeds to the outside world.
Check out the below link on how to connect to external databases using Joomla's core database classes. Depending on how you structure, you could write one module with connection, table and query options that can be installed on all websites. This allows you to accomplish your goals for all websites while only having to maintain one modules code package.
http://docs.joomla.org/Connecting_to_an_external_database

Multi-Tenant Database & One Model - MVC & Joomla

I'm developing a component which has the below structure. This system is developed under Multi-Tenant concept.
www.a.com, www.b.com, www.c.com are web sites which are in different domains but they run the same system. Each website have their own template and web pages in their local database. That's doable.
The system which is ran on these three sites are independent from the mentioned above(templates etc). www.a.com, www.b.com, www.c.com have a one large database where all the system data is maintained. Since the system is developed according to MVC what I want to do is have a single model(multiple models) where all the logic is contained. So if I make a single change in the model it affects the 3 sites.
According to my research, model should be maintained in the cloud. How can I implement such a requirement with MVC(Given I'm using Joomla as my CMS, MySQL as DBs) ? How can I have a single model for all the 3 sites ?
You can put more than one domain on the very same joomla installation without any changes, just add a plugin that's called virtualdomains which will allow you (for free) to choose template and - thus - menus, extensions and available pages for each domain;
Maintenance-wise this will be easy since all is in one box; but the users will see three sites with different content, layout and urls.
Just a couple of warnings:
1) make sure no scripts or css or other local resources are invoked with the url (http://www.a.com/template/xxx/js/jquery.autocomplete.js) vs /template/xxx/js/jquery.autocomplete.js, the first will work badly with cache.
2) handle any intricacies such as same-url on different domains with .htaccess; use a sh404 or similar component to manage the SEF urls.
This model looks quite complicated to me.
It depends what the main goal of this? Its just fetching all articles/users together? But why?
If you are dealing with problem of running one project on multiple Joomla installations I can advise you to put them on single Joomla and than using Virtual Domains (http://extensions.joomla.org/extensions/core-enhancements/multiple-sites/7557) for "copying" the website on other domains. Then you will one database for all your project.
One downside of this is that its mainly suitable for the projects with same component and article structure. Meaning for example local news divided by regions under different domains etc.
For the reference: the solution is really working fast on Joomla 2.5 latest update.

Using Wordpress as a CMS - advice on doing it for localhost?

I have a plain-vanilla install of Wordpress on localhost, virtual host in Apache set to:
127.0.0.1 myradiostationhere.com
127.0.0.1 www.myradioanytown.co.uk
and the virtual host works.
However, I don't want to use it as a blog, but as a CMS like here:
http://www.brmb.co.uk/
and
http://www.brmb.co.uk/schedule/
(basically, any pages on that site are database-driven Wordpress pages, not blogs).
I'm not asking how to create pages etc. - I understand that - but rather if anyone knows of the best way to do this.
I'm trying to emulate their look, but with similar CSS stylesheets, as per:
Fair dealing in a work for the purposes of private study or research (s. 29)
under Copyright, Design and Patents Act 1988 (that's the legal bit out the way).
Would I need to edit the PHP files in order to get this to work in the way I intend to?
Anyone here had experience of custom Wordpress CMS design/installs, and how would you recommend I go about this?
(note: This isn't for a live radio station site, it's a development/testing site on localhost!)
You basically want to create WordPress theme.
You will need a bit of PHP editing, but mostly of the copy-and-paste variety (to get you started).
Another option is to download a similar free theme or even buy one.

Categories