WordPress multi-site (aka network) installation

Well, what’s more obvious for a new WordPress blog on IT systems woes than reporting on its installation?

The base installation itself went fairly smooth, all done on an existing Linux server:

  • downloaded the latest WordPress zip file
  • unpacked the content to a fresh directory
  • created a new virtual host for the Apache web server pointing to the new directory
  • set up a new MySQL database, user and the corresponding grants
  • added a .htaccess file to the directory, offering some basic protection while the blog is under test
  • created the required DNS entry
  • reloaded the web server

…and off it went. I opened the installation URL and everything went smoothly.

Of course, I already knew that I’d go for the multi-blog setup (via sub-domains) and had read all about it in http://codex.wordpress.org/Create_A_Network, so I immediately tried to get that operational, too:

  • created the corresponding wildcard DNS entry
  • added the ServerAlias entry to the Apache vhost definition
  • edited $SITEROOT/wp_config.php to add WP_ALLOW_MULTISITE
  • ran the set up under “Tools” – “Network setup”
  • received the changes to .htaccess and wp_config.php and manually typed them in

But logging in to the site just resulted in a big fat message “Error establishing a database connection”. Bang!
After re-running all of the above (with the same result…don’t we all love reproducible problems) and searching the net up & down, I spotted a post about database repair (called via http://…/wp-admin/maint/repair.php), which yielded in messages about missing tables (like “Table ‘wordpress.wp_1_posts’ doesn’t exist”). Searching for that message I finally came across a minor comment in a forum thread about mistaking “MULTISITE” for “WP_ALLOW_MULTISITE”… and yes, having had to manually make the changes to wp-config.php, I made the same mistake. Once I added “define( ‘MULTISITE’, true );” as requested by the setup tool, everything was back to operational.

Had I used cut&paste (which was not available to me where I was doing my work at the time), I’d have had it up & running in less than a quarter of an hour. Of course, that’s only for the initial installation and setting up blogs “out of the box” – but nevertheless this is amazingly easy and quick: A big “thank you” to all the developers working on WordPress.org!

This entry was posted in WordPress. Bookmark the permalink.

Leave a Reply