WP-Create

Super fast way to install WordPress for clients, via subversion. Yes, users can often self-install via Fantastico or similar programs, but what guarantee do you have that they’ll upgrade as soon as new releases become available? Letting users run old versions of web software is a great way to get hacked. Take control of users’ installations by checking them out via svn (with this script) and managing them with wp-mass-upgrade.

This script performs the following tasks:

  • Gather installation info
  • Create install dir and check out a copy of WordPress
  • Create database, db user, set db privs via external .sql file
  • Create WP config file
  • Create upload dir and set filesystem permissions
  • Generate array line for wp-mass-upgrade.sh

Final setup is done via browser.

Download wp-create 1.0

Posted: 04-13-08 · 23 Comments »

23 Responses to “WP-Create”

  1. Sudar wrote:

    Thanks for sharing the script. I maintain a couple of WordPress installations in my server and this will surely save me lot of time in keeping them updated.

    April 25th, 2008 at 5:05 am
  2. shacker wrote:

    Thanks Sudar – Hope you find it useful. Note that I found one small bug in the chown line (143) and just fixed it. You might want to grab a fresh copy, or just change line 143 to:

    chown -R $owner:$owner *

    (the previous version changed the ownership of the parent directory).

    April 25th, 2008 at 8:26 am
  3. Stuart Jones wrote:

    Hi

    I haven’t set up my blog yet but I’m planning on customizing my wp configuration with plugins and themes

    I was thinking that I’d need to install wp on my dev box and then svn checkin into my own SVN server from the dev box then svn update on the production box

    Is there a way to use the wp SVN and still have customizations in my own SVN do you think?

    Thanks

    April 29th, 2008 at 1:54 pm
  4. Installing Multiple Blogs wrote:

    [...] http://birdhouse.org/software/2008/04/wp-create/ [...]

    May 12th, 2008 at 12:12 pm
  5. shacker wrote:

    Stuart – Your customizations would be in themes and plugins, not in core, right? So… no problem – just point the script to your own svn repo rather than to the official one.

    May 14th, 2008 at 4:50 pm
  6. Links for Wed 14 May 2008 - Joseph Scott’s Blog wrote:

    [...] scot hacker’s scripts and utils > WP-Create – Script for setting up WordPress site, checked out from Subversion. Tags: wordpress wp-create « Twitter Updates for 2008-05-13 [...]

    May 14th, 2008 at 7:51 pm
  7. Stuart Jones wrote:

    Thanks Shacker!

    You mean change the svn checkout line
    svn co http://svn.automattic.com/wordpress/tags/$wpver/

    to

    svn co http://svn.example.com/mysvn/wordpress/tags/$wpver/ .

    I haven’t figured out how to set up svn so that the bulk of the wordpress files can come from the public svn while still maintaining my own svn of the local customizations

    Right now I’m exporting the public wp svn into a folder structure and manually updating the core files in my own svn, then checking those files into my own svn, this works but introduces the potential for a screw up or two.

    Thanks for the greats script

    August 13th, 2008 at 11:02 pm
  8. Hosting multiple blogs on a single WordPress installation » Paul Maunders | Web log wrote:

    [...] management of blogs with WP-Create and WP-Upgrade – These scripts let you install multiple blogs in parallel, each one would get [...]

    August 31st, 2008 at 7:23 am
  9. Ranga Prasad Mutyala [Help Needed] wrote:

    Dear Scot,

    I was trying to install “WP-Create” and WP-mass Install.
    But I don’t know how to start .. Its a just a text file. Its it a server side script ?
    Can you help me how to proceed.

    Thanks and Regards

    Ranga
    rangaprasadmutyala@yahoo.co.in

    November 25th, 2008 at 11:00 pm
  10. shacker wrote:

    Ranga – Yes, it’s a bash shell script. It assumes a pre-existing knowledge of working with shell scripts. But basically just put in a directory along with root’s other scripts, chmod 700, and run it:

    /path/to/wp-create.sh

    November 26th, 2008 at 12:49 am
  11. chris wrote:

    nice script! do you have any plans to automate symlink-based WP installs/upgrades? i run a few high-traffic blogs which had always been competing with each other for APC (inode-to-opcode cache) space: symlink-sharing their WP installs got rid of this redundancy.

    December 11th, 2008 at 9:05 pm
  12. shacker wrote:

    Thanks Chris. No, I don’t have plans to do that particular modification. If you do, let me know and I’ll incorporate it if it plays well with the standard setup.

    December 12th, 2008 at 12:48 am
  13. Lee Down wrote:

    Is this valid with WP’s latest versions also?

    February 25th, 2009 at 2:56 pm
  14. shacker wrote:

    Hi Lee – This is a shell script that runs outside of WP. It is ignorant of WP itself and thus it is not possible for it to have a version incompatibility.

    February 25th, 2009 at 2:59 pm
  15. Lee Down wrote:

    sweet… like to be cautious and not get in over my head technical skill-level. :)

    February 25th, 2009 at 3:37 pm
  16. Denis wrote:

    Hi

    Great work, found this as I was about to (painfully) try and write a script to that effect. Apparently though, I get a syntax error when trying to run it on a standard (CentOS) dedicated Linux server: After all the input infos are entered, the script outputs
    “./WP-create.sh: line 52: syntax error near unexpected token `newline’”
    Did I do something wrong on installing it ?
    Thank you !

    March 11th, 2009 at 8:22 am
  17. shacker wrote:

    Dennis – You’ll want to comment out either of line 50 or 51. If your system is not cPanel, you probably want to comment out line 51 (still I’m surprised you’re getting that error…)

    Also try and “show invisibles” in your text editor to make sure you haven’t introduced some kind of hidden character after a line somewhere.

    March 11th, 2009 at 8:57 am
  18. Denis wrote:

    Thanks for the quick and efficient reply, I managed to make it run by changing those lines as I am indeed not using CPanel. I will now try to extend the script by appending the correct Virtual Host value and restart Apache: as I have a wildcard DNS thingy, this should make an instant functional Wordpress install.
    You have an interesting blog by the way !
    Kudos for sharing such nice scripts.

    March 11th, 2009 at 1:54 pm
  19. Johan wrote:

    Hi,
    When i run the script i get error

    wpinstall.sh: line 64: svn: command not found

    Any reason why
    Thanks
    Johan

    December 24th, 2009 at 4:30 am
  20. Johan wrote:

    Hi,

    Also if i have got fantastico installation will i be able to do a mass update on those as well by including them in the list without doing a fresh install.

    (i have +- 120 wp installations and getting tired of doing upgrades one by one so this will work perfectly for me)

    Thanks
    Johan

    December 24th, 2009 at 4:34 am
  21. admin wrote:

    Johan – ” svn: command not found” means, of course, that you don’t have svn installed. Obviously you’ll need to install subversion if you want to use a tool that wp-create that’s all about managing WP via subversion.

    As for the fantastico problem… I’m very familiar with that one :( Your goal here is to take control of managing upgrades out of your user’s hands and put it in your own hands. And unfortunately that means a few things. 1) You need to disable WordPress in Fantastico so people are no longer able to use it, and 2) You need to convert all of those old non-subversion installations into subversion installations. I don’t have a script for that but I did write most of the Codex page covering the process — the last section of http://codex.wordpress.org/Installing/Updating_WordPress_with_Subversion . So yes, that initial process will be painful, but once you have all installations converted, the upgrade path server-wide becomes seamless and effortless. Worth putting the work in up front.

    December 24th, 2009 at 11:44 am
  22. dennyhalim.com wrote:

    how bout a new features: auto fill for latest wp version, and auto generate db user & passwd, secret key and table prefix.

    imho, no one need to know any of these. if anyone want to know, just read the generated config file.

    January 31st, 2010 at 6:28 am
  23. shacker wrote:

    Denny – wpcreate already does generate the key for you. The rest are good suggestions. I’m in the middle of another project for a while but will definitely do these for the next revision. Patches welcome.

    January 31st, 2010 at 10:12 am

Leave a Reply