What a mouthful that title is! Just wait ’till you read the next sentence. If, like me, you installed a few WordPress blogs into subdomains before the advent of WordPress 3 with Multi Site features and you now want to consolidate your blogs into a WordPress 3 network with all subdomains managed from one WordPress Multi Site installation then you will need a little tutoring about how to convert your multiple blogs into one Multi Site blog network. I have successfully moved many subdomain installations into a single Multi Site installation and now it’s time for me to be nice and let you know how to do it. So grab yourself a drink and get comfortable because you could be in for long read and a few hours work if you have a big site to export. If your site is small then it will take you about 30 minutes to import to a virtual subdomain. Good luck!
Before you start you need to be aware of a few things:
- Check that the plugins and theme(s) used by your individually installed blogs are compatible with WordPress Multi Site. Most plugins and themes will function faultlessly but when they go wrong…
- A fault in any one of the sites in your Multi Site set-up could bring down your complete network. To my knowledge, the only faults that will bring down your network are plugin, theme and database related. Plugin and theme errors are easily fixed by the deletion or removal of the faulty plugin’s or theme’s files from /wp-content/plugins/ or /wp-content/themes/, respectively.
- WordPress Multi Site subdomain (and subdirectory) sites all use the same database as the parent (non-subdomain) site. It is possible to give them a database of their own and I will explain how to do that in a later article. If the database breaks try to repair and optimize it with PhpMyAdmin or whatever your host’s database management software is. Back up your database regularly.
- A regular WordPress installation (non- Multi Site) uses the default table prefix of WP_ for all of its tables. The Multi Site database is a little different: the table prefix for the first (primary/main/top) site uses the table prefix WP_ and all other sites have the table prefix WP_n_ (where ‘n’ equals a site’s number); the prefix number is usually equal to a site’s creation order and is the same as its unique storage directory’s number (under wp-content/blogs.dir). For example, the main blog uses the table prefix WP_ and the upload folder wp-content/uploads; the first addon site will use the table prefix WP_1_ and the upload folder /wp-content/blogs.dir/1.
- The deletion of an addon site will remove its table data from the database and its upload directory from /wp-content/blogs.dir. The creation of a new site or recreation of a deleted site will not fill-in any numerical gaps in the database table structure or the /wp-content/blogs.dir directory structure. For example If you delete the most recently created site and it uses wp_3_ and /wp-content/blogs.dir/3 then recreate it, it will use wp_4_ and /wp-content/blogs.dir/4; no site will ever again use wp_3_ and /wp-content/blogs.dir/3.
- Plugins installed by the main site’s administrator are usable by all blog authors if “Enable administration menus>Plugins” has been ticked under Super Admin>Options. For example, if you have 10 subdomain blogs created by 10 authors and you (the administrator) have installed 100 plugins then all 10 users will have access to all 100 plugins.
- The difference between Activate and Network Activate for plugins is:
- Network Activate enables a plugin across all sites within the network;
- Activate enables a plugin for the local site it is activated within (one site).
- Plugin settings do not cascade through every networked site i.e. if you install the TinyMCE Advanced plugin to to improve the native WordPress visual editor then the changes you make to one site’s editor will not be effected within other sites of the network. Unfortunately there is no way to enable network wide plugin settings changes, yet.
- Every subdomain or subdirectory site added to a WordPress MS network is given its own storage space in /wp-content/blogs.dir/[site number]/. Even so, some WordPress Multi Site folders are shared by all sites within the network that sit on the same domain. Those shared folders include all the ones under /wp-content except /wp-content/uploads and /wp-content/blogs.dir.
- Multi Site subdomains are virtual entities. Do not bother to look for them, you will not find them because they only exist in the site’s database. You can read more about how this is accomplished here.
- When including files into a single domain site (non Multi Site), you would usually place included files in the installation’s root directory (/) or in some subdirectory of the root directory, for example
Multi Site site’s function in exactly the same way. Included files are placed under the main domain’s root folder and are referenced relative to that root folder. Be careful not to muddle up the names of the files included in each of your sites.
- A virtual subdomain created with Multi Site will neither override nor overwrite a real subdomain so even if you create a real subdomain called one.domain.tld and a virtual subdomain called one.domain.tld (both have the same address), the only one that will be served to visitors will be the real one; the virtual one will be hidden until the real one’s DNS record is deleted.
Now that you’re a little more knowledgeable, let’s move onwards and upwards…