Technosailor.com Readers! Donate today to assist the GlobalGiving Haiti Earthquake Relief Fund in their efforts.

12 March 2006 33 Comments

WordPress Unattended Installs

As of the writing of this entry, b5media has over 90 blogs with more coming everyday it would seem. Part of my job as Systems Administrator is to automate my tasks. For instance, before a blog setup would take weeks because of all the people it had to visit before being launched. The Channel Editor would send the notice to the guys about the new blog. Duncan would register the domain and setup DNS. He would shoot me an email to have a virtual host account setup on our cluster along with a MySQL database for wordpress. I would shoot the ticket back to him and he would install WordPress. Then he would send it over to Ingrid for graphics and template design. Finally, when Ingrid was done, it would go to Darren who would take care of the advertising bit and finally back to the Channel Editor who would consult with the blogger and assist in last minute tweaks, plugins, etc.

At some point, there would be a launch and the angels in heaven would sing “Hallelujah!” and the sun would stand still in the eastern sky and out of the clouds would ride the King of Glory in a chariot…. ummm, yeah. ;)

My point is that that takes a long time and I’ve now developed an automated process that takes care of everything but the advertising and template design in about 5 second making Duncan’s job obsolete. ;) You’re fired, mate! I plan to write a post soon on the power of automation soon anyway. This is not the one for it.

However, part of the cumbersome process of maintaining so many blogs is trying to keep a common environment. There are certain configurations that we deploy out of the box for our blogs. From my experience in enterprise, I am quite familiar with the XP Unattended install where systems can be imaged with an XP image by feeding it certain options from an .ini file.

Thought I, “Wouldn’t it be great if I could get WordPress to read all of my configuration options from a file, say

1
wp-unattended.ini

?” I proposed it to a few people who are working with WordPress development and they liked the idea, but wasn’t sure it had enough juice for the core. Nevertheless, they recommended I go forward with the script and submit it. It is currently waiting for a second opinion.

But this is how it works.

First I developed a custom plugin called WP Unattended Export. This plugin is really only beneficial if you plan to deploy other blogs and you want the same stock settings on all blogs. Go through a blog “image”, set things how you want them, then use this plugin to export settings to a .ini file. You will have to copy the results from your browser into

1
wp-unattended.ini

which will look something like this.

Now, it’s time to create the script that will import settings from WP-unattended.ini. The reality is, it is very difficult to get code implemented in the WordPress core. It must be lean and mean and extremely useful. To that end, I tried to keep a low profile with the code – it’s already bad that I’m proposing adding an entirely new file. Anyways, I created

1
automated-install.php

that looks like this. Finally, I just needed to make sure the install script would check to find out if

1
wp-unattended.ini

exissted, parse it if it did and make necessary adjustments to the WordPress stock options.

I did this with this modification to the install.php.

All this changeset indicates is that two lines are added to install.php to include the

1
automated-install.php

file if

1
wp-unattended.ini

exists.

I can’t say I’ve done exhaustive testing of this process, but so far it works pretty good. This is really a great way for blog networks to consider deploying blogs.

Pick up your copy of the WordPress Bible, a wildly popular resource for beginners and experts alike.

Popularity: 1% [?]

33 Responses to “WordPress Unattended Installs”

  1. Jesse 12 March 2006 at 4:44 pm #

    nice. at the rate we’ve rolled out blogs that could save us a ton of time.

    I think I’m starting to get a very good idea of why Jeremy hired you :)

  2. Jesse 12 March 2006 at 4:44 pm #

    nice. at the rate we’ve rolled out blogs that could save us a ton of time.

    I think I’m starting to get a very good idea of why Jeremy hired you :)

  3. Jesse 12 March 2006 at 4:44 pm #

    nice. at the rate we’ve rolled out blogs that could save us a ton of time.

    I think I’m starting to get a very good idea of why Jeremy hired you :)

  4. Ingrid 13 March 2006 at 11:38 am #

    Heh heh, I’m happy my job can’t be automated … ;)

    (Yet.)

  5. Ingrid 13 March 2006 at 11:38 am #

    Heh heh, I’m happy my job can’t be automated … ;)

    (Yet.)

  6. Ingrid 13 March 2006 at 11:38 am #

    Heh heh, I’m happy my job can’t be automated … ;)

    (Yet.)

  7. Aaron 13 March 2006 at 11:39 am #

    We’re working on it. ;)

    Just kidding.

  8. Aaron 13 March 2006 at 11:39 am #

    We’re working on it. ;)

    Just kidding.

  9. Aaron 13 March 2006 at 11:39 am #

    We’re working on it. ;)

    Just kidding.

  10. HART (1-800-HART) 2 June 2006 at 3:16 am #

    Sounds adventurous. What about the other stuff? Sidebar maintenance, network codes, ad codes, feedburner, links unique to the blog, etc etc etc.?

  11. HART (1-800-HART) 2 June 2006 at 3:16 am #

    Sounds adventurous. What about the other stuff? Sidebar maintenance, network codes, ad codes, feedburner, links unique to the blog, etc etc etc.?

  12. HART (1-800-HART) 2 June 2006 at 3:16 am #

    Sounds adventurous. What about the other stuff? Sidebar maintenance, network codes, ad codes, feedburner, links unique to the blog, etc etc etc.?

  13. Aaron 2 June 2006 at 7:46 am #

    Can’t be done in a single swoop. Some people get YPN. Some Adsense. This is just a rough out of the box deployment to get the ball moving.

  14. Aaron 2 June 2006 at 7:46 am #

    Can’t be done in a single swoop. Some people get YPN. Some Adsense. This is just a rough out of the box deployment to get the ball moving.

  15. Aaron 2 June 2006 at 7:46 am #

    Can’t be done in a single swoop. Some people get YPN. Some Adsense. This is just a rough out of the box deployment to get the ball moving.

  16. HART (1-800-HART) 2 June 2006 at 9:39 am #

    It’s never really a 5-minute installation, although it’s been getting easier and easier to install a new blog and even upgrade – it still takes time. For me, it’s mostly the adsense, sidebar and feedburner stuff as I just have one blog opened in another tab. But, I’ve got a batch of 5 new ones being created early July .. perhaps I can give this a try. Any time saving is good. Keep Creating neat plugins!

  17. Aaron Brazell 2 June 2006 at 9:42 am #

    Adsense, Feedburner, theme layout, etc… not really a WordPress issue, is it? WordPress is really a 5-minute install. Sure you have to deal with Kubrick and Matt and Donccha in the blogroll, but it is alive and functioning, no? ;)

  18. HART (1-800-HART) 2 June 2006 at 9:45 am #

    All part and parcel :)

  19. HART (1-800-HART) 2 June 2006 at 9:39 am #

    It’s never really a 5-minute installation, although it’s been getting easier and easier to install a new blog and even upgrade – it still takes time. For me, it’s mostly the adsense, sidebar and feedburner stuff as I just have one blog opened in another tab. But, I’ve got a batch of 5 new ones being created early July .. perhaps I can give this a try. Any time saving is good. Keep Creating neat plugins!

  20. HART (1-800-HART) 2 June 2006 at 9:39 am #

    It’s never really a 5-minute installation, although it’s been getting easier and easier to install a new blog and even upgrade – it still takes time. For me, it’s mostly the adsense, sidebar and feedburner stuff as I just have one blog opened in another tab. But, I’ve got a batch of 5 new ones being created early July .. perhaps I can give this a try. Any time saving is good. Keep Creating neat plugins!

  21. Aaron Brazell 2 June 2006 at 9:42 am #

    Adsense, Feedburner, theme layout, etc… not really a WordPress issue, is it? WordPress is really a 5-minute install. Sure you have to deal with Kubrick and Matt and Donccha in the blogroll, but it is alive and functioning, no? ;)

  22. Aaron Brazell 2 June 2006 at 9:42 am #

    Adsense, Feedburner, theme layout, etc… not really a WordPress issue, is it? WordPress is really a 5-minute install. Sure you have to deal with Kubrick and Matt and Donccha in the blogroll, but it is alive and functioning, no? ;)

  23. HART (1-800-HART) 2 June 2006 at 9:45 am #

    All part and parcel :)

  24. HART (1-800-HART) 2 June 2006 at 9:45 am #

    All part and parcel :)

  25. Jeremy Wright 7 June 2006 at 10:04 am #

    Hart, not really. Your issue is creating a centrally managed Theme. Which Wordpress is happy enough for you to do. With a centrally managed Theme, all that other stuff would come out of it. Once you had it, an unattended install would have your blog, and theme, setup in seconds. Without the theme, though, all this can do is install WP :)

  26. Jeremy Wright 7 June 2006 at 10:04 am #

    Hart, not really. Your issue is creating a centrally managed Theme. Which Wordpress is happy enough for you to do. With a centrally managed Theme, all that other stuff would come out of it. Once you had it, an unattended install would have your blog, and theme, setup in seconds. Without the theme, though, all this can do is install WP :)

  27. Jeremy Wright 7 June 2006 at 10:04 am #

    Hart, not really. Your issue is creating a centrally managed Theme. Which Wordpress is happy enough for you to do. With a centrally managed Theme, all that other stuff would come out of it. Once you had it, an unattended install would have your blog, and theme, setup in seconds. Without the theme, though, all this can do is install WP :)

  28. HART (1-800-HART) 7 June 2006 at 11:25 am #

    Hi Jeremy .. I’ve gone through the centrally managed themes (my 8 battling sites) where I spent the time on one theme, then copied it as part of the theme of the other 7 sites. Then you have to activate plugins including some with modifications to templates (eg tag warrior), all the feedburner chicklets. I still plan to give this plugin a try next month with the new 5 – but, I think I will just start from scratch on each one with a list of things to do next to my computer, instead of a list what to change or modify.

    It’s good that you got Aaron working for the benefit of all of us too :) Thanks.

  29. Aaron 7 June 2006 at 11:32 am #

    It’s good that you got Aaron working for the benefit of all of us too :) Thanks.

    All part of the spirit of open source. We use open source servers, an open source database server, open source blogging tools, so the stuff I write is usually in that spirit.

    And actually, I just “did” this to make my work easier. Not anything b5 commissioned me for. :)

  30. HART (1-800-HART) 7 June 2006 at 11:25 am #

    Hi Jeremy .. I’ve gone through the centrally managed themes (my 8 battling sites) where I spent the time on one theme, then copied it as part of the theme of the other 7 sites. Then you have to activate plugins including some with modifications to templates (eg tag warrior), all the feedburner chicklets. I still plan to give this plugin a try next month with the new 5 – but, I think I will just start from scratch on each one with a list of things to do next to my computer, instead of a list what to change or modify.

    It’s good that you got Aaron working for the benefit of all of us too :) Thanks.

  31. HART (1-800-HART) 7 June 2006 at 11:25 am #

    Hi Jeremy .. I’ve gone through the centrally managed themes (my 8 battling sites) where I spent the time on one theme, then copied it as part of the theme of the other 7 sites. Then you have to activate plugins including some with modifications to templates (eg tag warrior), all the feedburner chicklets. I still plan to give this plugin a try next month with the new 5 – but, I think I will just start from scratch on each one with a list of things to do next to my computer, instead of a list what to change or modify.

    It’s good that you got Aaron working for the benefit of all of us too :) Thanks.

  32. Aaron 7 June 2006 at 11:32 am #

    It’s good that you got Aaron working for the benefit of all of us too :) Thanks.

    All part of the spirit of open source. We use open source servers, an open source database server, open source blogging tools, so the stuff I write is usually in that spirit.

    And actually, I just “did” this to make my work easier. Not anything b5 commissioned me for. :)

  33. Aaron 7 June 2006 at 11:32 am #

    It’s good that you got Aaron working for the benefit of all of us too :) Thanks.

    All part of the spirit of open source. We use open source servers, an open source database server, open source blogging tools, so the stuff I write is usually in that spirit.

    And actually, I just “did” this to make my work easier. Not anything b5 commissioned me for. :)