BlogNorway.com multi site installation/redirection problem.

Blogging and web publishing for the impatient.
KBleivik
Site Admin
Posts: 178
Joined: Tue Sep 29, 2009 6:25 pm
Location: Moss Norway
Contact:

BlogNorway.com multi site installation/redirection problem.

Postby KBleivik » Thu Jan 23, 2014 8:14 pm

1. Background

viewtopic.php?f=18&t=220

2. Contact your hoster before you install

You have to check with your hoster if a Wp multisite installation is possible. See the above link for additional information. Especially note the following

You will need to get your DNS references all correct, then start your wordpress mutlisite settings. And you need to have the correct folder structure and the DNS reference to point to the correct folder name. WordPress will expect to have : maindoman.com/addondomain.com as the URL if you are on a shared server.


That structure maindoman.com/addondomain.com was not accepted when I added sites in the Network sites panel. Only the structure maindoman.com/addondomain/ was accepted, so I used that structure. The structure maindoman.com/addondomain.com is the default structure for add on domains at my hoster. My hoster had to change the structure for add on domains from maindoman.com/addondomain.com to maindoman.com/addondomain/

3. Read the installation guide

http://codex.wordpress.org/Create_A_Network

I deleted all information in the automatically single installation .htaccess file and uploaded the following

.htaccess file

Code: Select all

# Modified for multisite Wp installation.¨
# The next line may be commented out on some servers.
# Options FollowSymlinks
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]

# add a trailing slash to /wp-admin
RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]

RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
RewriteRule . index.php [L]


4. Result

Main domain: http://blognorway.com/

Add on domains (links broken after the final solution - see 7. below):

[blognorway.com/articlenorway/]

[blognorway.com/expert-links/]

[blognorway.com/cybertoolbar/]

5. Domain name mapping

I have not solved the redirection / mapping of

of the add on domains to the sub folders.

The following http://wordpress.org/plugins/wordpress- ... n-mapping/ plugin is used. In the plugins folder there is a readme text document that tells you to read this http://ottopress.com/2010/wordpress-3-0 ... -tutorial/ tutorial.

It tells you to copy the file sunrise.php located in the plugin folder to the wp-content folder and add the following line to your wp-config.php file:

define( 'SUNRISE', 'on' );

I did that and uploaded the two files wp-config.php and sunrise.php to the server.

Then I logged into the network as super admin and clicked:

My sites + Network Admin + Dashboard.

I then clicked

Settings + Domain mapping

and a page that started as follows

Domain Mapping Configuration

As a super admin on this network you can set the IP address users need to point their DNS A records at or the domain to point CNAME record at. If you don't know what the IP address is, ping this blog to get it.

If you use round robin DNS or another load balancing technique with more than one IP, enter each address, separating them by commas.


was loaded. On that page, I put in the main site's Ip address, checked the option "Permanent redirect (better for your blogger's pagerank)" and saved the page. Then I continued with the tutorial http://ottopress.com/2010/wordpress-3-0 ... -tutorial/ ,

Step 4: Mapping the Domain

There’s a bit of a prerequisite here before you do this. When you buy a new domain, you will need to edit its DNS settings to actually point to your server IP or CNAME or whatever you do to make the domain connect to your server. For me, I just give it a new A record with my server IP in it. Easy.

Update: Okay, so there may be more to it than just that, depending on your host. Every host is different, and you’ll have to talk to your host to make them able to point the domain name at your existing site. How to do this varies from host to host, but the important thing is that when you visit your new domain (before you do this!) then you want it to go to your main site, as is.

There’s two ways you can actually map a domain to one of your sites. The user screen is the simplest way, if you left that option on before. Log into the site you actually want to map to a new domain, then go to Tools->Domain Mapping.


But it will not function as explained in this

http://wordpress.org/support/topic/mult ... on-domains

Wp forum thread. If you have the solution, you can post it there.

6. Multisite Network Administration

http://codex.wordpress.org/Multisite_Ne ... nistration

Especially, note the following:

The capabilities of the site administrator role are also reduced in a WordPress Network. Site admins cannot install new themes or plugins and cannot edit the profiles of users on their site. Only the Network Admin (aka Super Admin) has the ability to perform these tasks in a WordPress network.


Permalinks

While permalinks will continue to work, the main site (i.e. the first one created) will have an extra entry of blog, making your URLs appear like domain.com/blog/YYYY/MM/POSTNAME.

This is by design, in order to prevent collisions with SubFolder installs. Currently there is no easy way to change it, as doing so prevents WordPress from auto-detecting collisions between your main site and any subsites. This will be addressed, and customizable, in a future version of WordPress.


7. The final decision - When to multisite?

I think this

As a general rule on whether to use multisite installs or not you can say:
  • If the sites are similar in functionality (use same modules or use the same drupal distribution) do it.
  • If the functionality is different don't use multisite.

This is because you want your sites to stay as up-to-date as possible regarding drupal module security updates and when you have different functionalities this is more difficult to do because it takes a little more time since you need to test each site independently. If you are doing multisite, then the update needs to be run at the same time for all the sites which is not always possible.

So sites with different functionality usually end up being upgraded at different times because each needs to be tested and backed up. Site updates and backups are also pretty easy to do and can be automated with drush, but drush has little support for multisite install.

https://drupal.org/documentation/instal ... -site#when

drupal post made my day.

When you look at the add on domains:

they have very different functionally, so my final decision to install a separate wordpress platform with a unique database is justified, and perhaps the best in the long run, not least because of the unique database solution for each site.

Return to “WordPress”

Who is online

Users browsing this forum: No registered users and 1 guest