Archived entries for WordPress

Run Multiple Sites with One WordPress Install

Using a single codebase of WordPress to run more than one site has never been easy to do – all previous methods involved hacks, and never allowed 100% compatibility with all plugins. I’ve experienced both homebrew single-codebase hacks and I’ve also used Virtual Multiblog (the best previous method).

However, with the release of WordPress 3, multiblog support is included natively. And it works great – the plugins I tested are all usable with none of the previous issues I’d seen with the “hacks” I had tried in the past.

In addition, by using a plugin (a plugin intended for WP-MU actually), you can run your multiple WordPress sites on their own domain names.

Best of all, it can all be done by using a single shared-hosting account.

At present, WordPress 3 is still in beta, but that hasn’t stopped me from putting it to use. I currently have a fully-functional network of around 20 sites, all running from a single install of WordPress 3 on a Hostgator shared hosting account and it hasn’t thrown up any errors or anything. For the most part, WP 3 is probably stable for most uses. Just back up your data regularly – especially before you attempt to upgrade anything.

Here’s how to do it, in very basic steps:
1. Install the latest WordPress on your hosting account. (These instructions assume cPanel hosting.) At the moment, version 3 is located here.
2. In your cPanel account, enable wildcard subdomains. This is done by creating a subdomain of “*”. Yes, just an asterisk.
3. For each of the domains you plan on hosting, add it as a Parked Domain. (Of course, this excludes your “main” domain.)
4. In your wp-config.php file, add the following: define(‘WP_ALLOW_MULTISITE’, true);
5. In your WordPress admin, go to Tools->Network to enable the hosting of multiple blogs. Choose the subdomain option. Do not choose the subdirectory option!
6. Create your sites from within the new “Super-Admin” menu.
7. Download and install the Domain Mapping Plugin.
8. For each of your “sub-sites”, login to the admin and go to Tools->Domain Mapping. Enter the domain name and check the box.
9. Go back to your main site’s Super Admin menu.
10. Click on “Sites” and edit each site. For each one, change the domain to it’s full actual domain name.

At this point, you should be able to login to each of the sites’ admin section from it’s domain name. Each site will have access to all the Themes and Plugins, and you can easily upgrade all the sites at once. Easier maintainability for sure!

How to Conceal Your WordPress Version

There may be reasons you don’t wish to disclose that you’re using WordPress, or you may simply wish to disguise which version you’re using. I hope your reasoning isn’t for “security”, because this isn’t truly effective as a security measure. But whatever your reason, here’s how to do it.

First, go to your /wp-content/themes folder, and open the folder for your current theme. There should be a file named “functions.php”. (If this file doesn’t exist, simply create the file.) Open this file, and add the following line to it:
remove_action(‘wp_head’, ‘wp_generator’);

That directive tells WordPress to remove the action of displaying the generator (which shows your WordPress version). It’s that simple!

You can do a lot of neat things within the functions.php file, as well – including adding new functions and removing other actions. For instance, you can remove some of the other (possibly useless) header info that WordPress outputs by default:
remove_action(‘wp_head’, ‘rsd_link’);
remove_action(‘wp_head’, ‘wlwmanifest_link’);

Think of the functions.php file as a way to implement a certain amount of plugin-like functionality, without having to actually install a plugin. If you know how to code in PHP the possibilities are vast.


-->

Search

Enter the query to search and hit enter.


Copyright © 2009 Shawn Plep, all rights reserved. SHTF411

RSS Feed.