Give birth to 10 WordPress blogs in 30 minutes

If you need to roll out multiple WordPress blogs, this article is for you. I’m going to show you how to set up 10 blogs in 30 minutes, or I’ll eat my hat! Not only that, but we’ll set them up with a standard group of plugins, extra search engine optimization, and security hardening to prevent hacking of your blog.

Here are the 4 basic steps:

  1. prepare the WordPress and plugins upload
  2. set-up your databases
  3. configure your wp-config.php file
  4. WordPress install process

Let’s get started.

Preparing a WordPress installation archive

First, download the latest version of WordPress (WP). Here’s the clever part of this step: because of the WordPress automatic update, you’ll never have to do this again. As I write this WP is at version 2.9.2, but when the next version is released and I want to install a new blog, I’m going to upload the older version (that I’m going to customize) from my computer. After I upload version 2.9.2 I’ll upgrade by going to Tools > Upgrade.

Now that you’ve downloaded and opened the zip file to your computer, let’s customize a couple of things. You’re going to need a plain text editor like Notepad (Windows) or TextEdit (Mac) to create four files. Make sure it’s a plain text editor that can create asci text files, otherwise you might have problems.

The first text file you create is named robots.txt. This file is where you’ll include the rules for search engines that index your site; if you restrict the search engine bots from indexing extraneous files on your site, it’s better for the good content on your site. These are the rules for your robots.txt file:

 

User-agent: *
Disallow: /cgi-bin
Disallow: /wp-admin
Disallow: /wp-includes
Disallow: /wp-content
Disallow: /trackback
Disallow: /feed
Disallow: /comments
Disallow: /category/*/*
Disallow: */trackback
Disallow: */feed
Disallow: */comments
Disallow: /*?*
Disallow: /*?

Sitemap: http://www.yoursite.com/sitemap.xml.gz

 

See that last line? That tells search engine bots where you’re site map is; we’ll get to that in a moment, but for now just change the domain to yours. Save the robots.txt file into the WP directory that you unzipped.

Next we’re going to create the .htaccess file. This file can do many things, among them it includes the rules for your permanent link structure (found under Settings > Permalinks). Add the following rules to your .htaccess file and save it into the WP directory.

 

Options All -Indexes

# protect wp-config.php
<files wp-config.php>
Order deny,allow
deny from all
</files>

RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]

 

wordpress directory
Highlighted files we'll be working with

First, note that depending on how the preferences are defined on your personal computer (Mac or Windows), you may or may not be able to see any file that begins with a period, as in “.htaccess”. Because of this, it’s probably best to not include the period when you save the file into your unzipped WP directory; you can add the period (don’t forget) after all the files in the WP directory are uploaded to your server using FTP (or better, SFTP). Also, after uploading  the file, removed the “.txt” so that the file’s name is “.htaccess”.

Looking back at the code I gave you for the .htaccess file, let’s review it from the top. To begin with, the first rule tells the server NOT to display the contents of any directory that doesn’t include any type of index file, such as index.php or index.html. This is for the security of WordPress and your server.

The next rule is also for security, and depending on your server may be redundant, but nevertheless won’t hurt anything. The rule allows access to your WP configuration file only from your server.

The last rule in the .htaccess file is for better tracking of statistics if you’re using something like Google Analytics. Did you know that “www.yourdomain.com” and “yourdomain.com” are two different things for search engines and site stats applications like Analytics? True. That means if you don’t force all your site visitors to one or the other domain URL, you may only be tracking some people. So, that last rule forces the server to always add “www” to your domain URL.

The last two text files you’ll create are “sitemap.xml” and “sitemap.xml.gz“. These are empty files that’ll be used by a plugin we’ll talk about soon. Don’t worry about them, though note that you might have to change their permissions using your FTP program in the future, depending on how the server is configured. The plugin will throw an error and tell you if that’s the case. No worries!

Gathering your WordPress plugins

Part of what makes the process I’m showing you so efficient is that you’re doing preparation that doesn’t have to be repeated in the future. So, gathering your plugins first and putting them into the ‘wp-content/plugins’ directory (unzip the plugins and delete the .zip files) will make your life easier. It makes sense because, at least for me, with minor exceptions, I generally always use the same plugins across many different WP Web sites.

You can develop your own set of go-to plugins (favorites), but here are the ones I recommend:

Again, this is the set of plugins I commonly use. Your set might be different. But, as with the easy updating of WordPress, the same is true with the plugins. If after uploading the WP directory you see that some of the plugins need updating, no problem: go to Tools > Upgrade and update all the plugins in one shot. Finished.

Set-up your databases

Because there are so many variations on how to set-up your database, depending on your server, I’m not going to get too deep into the details. I will note one thing: use strong passwords and unique database and user names. Make them a little weird, for security sake. Other than that, copy down the database info and let’s move on.

Configuring the wp-config.php file

This is straight forward, though let me recommend two things you should do. Under “Authentication Unique Keys” always make the effort to get your keys from https://api.wordpress.org/secret-key/1.1/ and copy them into your wp-config file. Always.

Second, under “WordPress Database Table prefix” always change the default “wp_”. This is for the security of your database. Never use the default. I always throw some random numbers in there like this: “w865p_”. It’s another small step for security, not using default or easily guessed values in your blog configuration.

Installing 10 Blogs Process

You’re ready. You’ve created a customized WordPress directory that you can upload multiple times. Look at that image above of the directory; does yours look like that? It should.

With your first database set-up and the wp-config file squared away, start uploading to your server. While that’s happening, on your other domains create your the WP databases, copying down the corresponding information. After the first upload is finished, move onto the second domain by editing the wp-config file again with the new information, then save. Upload to the second domain. And so on.

See how easy it is to roll out many WordPress blogs once you have a customized directory set up?

If you have any other tips that should be included in this tutorial, leave them in the comments. I can always learn something new.

Photo by Scott Beale (Laughing Squid) and republished here under a Creative Commons license.

4 thoughts on “Give birth to 10 WordPress blogs in 30 minutes

  1. Jeez…that’s pretty cool. I just use fantastico, but I really like this for doing that many at a time.

    I also might try a couple of plugins you have that I haven’t seen before…thanks

    1. Yeah, I’ve used Fantstico, but I’m not a big fan. I like having much more control over my installation. Plus, before WP native automatic updating, you always had to wait sometime before there was an updated version of WP through Fantastico. That problem doesn’t exist anymore.

      Glad I could help.

  2. You have put so much information in one post here. Thanks for laying out the information in such a precise format that I actually I could do this in 30 minutes.

Leave a Reply