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.
Posted: 04-13-08 · 18 Comments »
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 amThanks 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 amHi
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[...] http://birdhouse.org/software/2008/04/wp-create/ [...]
May 12th, 2008 at 12:12 pmStuart – 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[...] 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 pmThanks 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[...] 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 amDear 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
November 25th, 2008 at 11:00 pmrangaprasadmutyala@yahoo.co.in
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 amnice 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 pmThanks 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 amIs this valid with WP’s latest versions also?
February 25th, 2009 at 2:56 pmHi 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 pmsweet… like to be cautious and not get in over my head technical skill-level.
February 25th, 2009 at 3:37 pmHi
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
March 11th, 2009 at 8:22 am“./WP-create.sh: line 52: syntax error near unexpected token `newline’”
Did I do something wrong on installing it ?
Thank you !
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 amThanks 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.
March 11th, 2009 at 1:54 pmYou have an interesting blog by the way !
Kudos for sharing such nice scripts.