Project Setup for Multisite development - wordpress

I am about to develop two websites using wordpress with its multisite functionality. So www.domain1.com and www.domain2.com should point to the same wordpress installation.
The problem I have is that the domains are in productive use, so I cannot make them point somewhere else until development is not finished. I also do not have (and do not want to buy) two unused domains to create the develop setup, so what I would like to know is:
Can I setup subdomains for development and change it into »real« domains later on?
What I would like to know is how to setup the project so that after development is finished, deploying is as painless as possible. The project setup should be close the »real world scenario« it is meant for as possible and I am interested in any kind of hints, advises, links and stuff which guides me setting up the projects.
Which are the pitfalls, where are the »dangerous« parts?
Greetings...

I'd suggest the following route:
Install the Multisite with a sub-domain set-up in a third domain that will be the Main Blog (example.com). In your host, you'll need Wildcard subdomains enabled. Otherwise, each sub-domain has to be manually created. With the wildcard, creating a new site is a matter of clicking Add site.
Then, in /wp-admin/network/sites.php, add two sites: domain1.example.com and domain2.example.com. And develop until they are ready.
You'll need the plugin WordPress MU Domain Mapping to map Top Level Domains to the sub-sites/sub-domains. With it, domain1.example.com will be a fully working domain1.com.
After all this is in place, is just a matter of changing the NameServers to point to the Multisite addresses.
Well, it seems simple but Multisite is not for the faint of the heart. But, one of WordPress.org wizards, Mika Epstein, aka Ipstenu, has two great eBooks that cover lots of ground. Please, check the following Answers in WordPress StackExchange where I cite them.
An interesting case study document.
Plugins of interest:
BackupBuddy: paid solution, although it's considered Beta, exporting and importing sites out and in the networks works ok.
Add Clone Sites for WPMU (batch), in the Repository, although hasn't been updated in a while, still works fine, doesn't exports/imports, but useful for duplicating sites inside the network.

Related

Show another-example.com as example.com/another in browser (2 domains/WordPress installations on 1 domain)

the company I work for currently owns two domains, e.g.:
example.com
another-example.com
I manage the WordPress installations, which run on those domains (two distinct installations with separate themes, plugins, webspaces, databases, ftp, etc.), in my free time as they always come up with challenging requirements which helps me improve my skills (and because the company is really nice to me in general).
They've asked me if it was possible to redirect another-example.com to example.com/another and display everything from the second WordPress installation under that URL.
For example the main page of another-example.com should be displayed under example.com/another, the subpage another-example.com/about-us should be displayed under example.com/another/about-us and so on.
All the WordPress pages of example.com should continue to work as they are now ("another" would in reality a word which would never be used as subpage of the main domain, so that won't ever be an issue). Basically they just want the browser to display example.com/another instead of another-example.com for "tracking, SEO and usability" (I didn't question that... 😅).
I just wanted to know whether this is possible or not.
One idea that came to my mind was to setup example.com as WordPress multisite installation and run another-example.com as subsite of that multisite on /another. Though I'm not very familiar with multisite, I blieve this is how it could work and it surely isn't to hard to migrate a normal WordPress installation to become a subsite of a multisite. I'm familiar with databases so worst case is I have to do some manual labor if it isn't already possible out of the box by using some backup plugin or so.
But I was thinking that maybe it is possible by changing some settings in the webservers. It's just that Apache HTTP servers aren't really my world at all and even though I tried to understand the configs multiple times over the last decade, I never did and I have no clue how that would work (if it is possible at all).
So my question is: Is it possible to achieve this by configuring the webserver and if so, can you also provide a working config we could use?
I'm also open to better suggestions than the two I thought about. Maybe theres something easier and better to achieve this goal.
Thanks in advance
Jan

WPML with Subdomains behaves very strange in combination with multiple environments

I'm currently working on a clients website where we want to split up the live environment into three different ones.
We currently want the following envs:
Production (Live website)
Preview (Unpublished live website for content management)
Staging (Development state for feature and development previews)
We have them setup via the following subdomains:
Live:
de.xyz.com
en.xyz.com
ch.xyz.com
Preview:
de.preview.xyz.com
en.preview.xyz.com
ch.preview.xyz.com
Staging:
de.staging.xyz.com
en.preview.xyz.com
ch.preview.xyz.com
NOTE: We're also using the WP cache with advanced-cache.php in combination with WP Engine Advanced Cache. Maybe thats a conflict?
Anyway, when I now login to the different backends and try to map the subdomains and save somehow the environments overwrite each others settings again, even though they are on separated webservers and use separated databases.
I'm really confused because when I for example set en.preview.xyz.com on the preview domain, somehow the same en.preview.xyz.com value is set on the staging environment.
Are there any known conflicts with WPML Subdomains and multiple Websites on the same parent domain or a caching plugin?
Thanks already a lot. My client already is kind of annoyed because the content managers are waiting.
Greetings!
I found the answer for my problem.
Basically the WP Supercache Plugin was setup wrong to work with different environments. I had to load the WP_CACHE_KEY_SALT from the .env-files in the object-cache.php

Externally managed htaccess-protected members area in WordPress with url rewriting?

I am considering converting a client project from a large number of hand-built web pages to a WordPress install. However, this client has a free area (site.com/) and a members area (site.com/members/). The members area is standard Apache .htaccess / htpasswd authentication. The authentication is handled by legacy billing software which we don't want to change at this time.
One thought is to put up two separate WordPress installs (or perhaps a MultiSite install?). One install sits on the domain root and the other sits at /members/. Thus neither install has to know anything about being password-protected. So long as the outer install cannot generate a url which includes /members/, I'm pretty sure the url-rewrite engines won't interfere with each other.
Another thought is to try to do everything in a single install, and expect the server to force authentication on any url that maps to /members/. But intuitively it feels like I'd have to go to a custom taxonomy to get "free area" category hierarchies separate from "member area" hierarchies.
Any WordPress plugins which I've found, and any related discussions, assume that the members are managed via WordPress. That's the issue: the members area is simply protected via old-school htaccess authentication.
I'm not sure that the WordPress url-rewrite mechanism would trigger the authentication part as intended, given that WordPress is sitting at the domain root, outside the members area.
On the other hand, running it as two WordPress installs, one inside the other, might be just what I need. Anyone have perspective on this? Anyone know of problems running WordPress "inside" WordPress as described?
Yes. Given my restrictions, a double install is the most reasonable solution.

Wordpress/Joomla on Shared IP, URL Not Root - Best Development Workflow?

we have a VPS for new site development, and were planning on using unique IP addresses for each new site/account so that while in development all links, URLs, etc. would be relative to the root (IP address) while in development and not need to change when going live (redirecting domain). But now our host won't allow us to purchase new IP addresses (according to worldwide shortage).
So now all new sites will be located at: http://shared.ip.add.ress/~cpanelaccount/. That means that while in development the sites are not using a root URL as we have been doing.
What is the best workflow while in development for relatively complex CMS solutions where we need to be able to confidently setup and test all links, SEF URLs, plugins, components, etc. without worrying about things getting messed up when the domain is switched (site goes live)?
Do we need to do some sort of global redirect in the .htaccess file?
Any modifications or strategies specific to Wordpress and/or Joomla installs?
THANKS!
I'd have to do an install of the latest WP to be sure, but at least with Joomla it is fairly irrelevant if you install in the root or a subdirectory. In the case of Joomla, there is only one change that needs to be made when moving from a subdirectory to the root. You'd need to change .htaccess to reflect the correct installation directory if you have enabled core SEF. Otherwise, there are no changes that need to be made at all. I am pretty sure WP is just as easy to move, but I'd have to look, it's been a while since I moved a WP site.

How to maintain your development website vs. production website in WordPress?

In a wordpress installation we want to have our main site, and a staging site separated and different. Where in the admin interface you separate your staging area?
Let's say:
for production you will have: http://www.yourdomain.com/
but for staging we want to have: http://www.yourdomain.com/staging
Staging is the website that will be in production next.
Any ideas?
With Wordpress 3.0+ you might be able to create a network of sites or install multiple sites with an older version of Wordpress. The catch is I don't know of an easy way of moving the staging to production. I'm not entirely sure that will do what you want, but you may want to look into it.
Personally I'd think you'd probably be better off keeping your staging and production sites on 2 different servers and just do a copy over when you move to production.
I don't know of any instant, simple answers, but have you seen this article in the Wordpress support forum? It has some informed discussion and at-least partial solutions:
http://wordpress.org/support/topic/one-wpseveral-servers
If your staging site doesn't need any database modification, or custom forms/widgets for the backend, you can create a new theme, and test it in the preview mode. When done, you can switch the theme to the new one!

Resources