• Hello everyone,
    I’m collecting data regarding automation of a local WordPress Install on a LAMP server.
    My goal is to create a (possibly bash) script (or a collection of them) that is able to deploy an apache virtual host with WordPress installed from trunk using svn, add some useful plugin like developer or theme-check, and add an “almost ready” wp-config.php file to the install, so that the user just needs to double check it and run the 5 minutes install.

    What else could I need? Automatic setup of a mysql user/database might be good, the option to batch update many WordPress installs and also plugins batch update would also be almost mandatory.

    What else? Suggestions?

    I know there’s projects like VVV, but I’m looking at something easier to deploy, on linux setting up a local AMP stack is just a matter of installing 3 packages which are usually preinstalled on many different distros, without having to worry about virtualization and stuff like that.

    I have already started writing such a script, I use it on a regular basis but I want to improve it and make it a full working solution, here it is, you can find it on github gist. Have a look and tell me what you think about it.

    meanwhile, thank you all.

Viewing 14 replies - 1 through 14 (of 14 total)
  • i kinda looked into this but did not get as far as you did.
    also why if a lamp host do you need to deploy virtual?

    this is where i left off.
    https://forums.cpanel.net/threads/how-to-automate-sql-database-creation-upon-new-user-creation.148065/

    Thread Starter danixland

    (@danixland)

    Thanks for your answer, using virtual hosts is ideal when you have multiple themes to develop/test, of course you could just create different directories inside apache’s docroot and it’s basically the same thing, again you could just setup one WordPress install and load every theme you want to develop or test in it, and just switch between them, but if I could do it so that it’s transparent to the user it’d be much better with vhosts, having everything set up automagically and just having to go to that specific host and start the WordPress 5 min setup.

    The link you gave me it’s interesting but relies on CPanel which I’m not going to use, what I’m trying to accomplish is to use bash only to setup everything since it’s something that is installed in every linux box.

    I was also thinking about cgi to be able to create a web gui but it’s something that implies a lot of security issues if not done properly and it’s something that can be done later on anyway.

    Thread Starter danixland

    (@danixland)

    Just a little update for those interested, I’ve written a bit of code in the past days and I’ve published everything on github, give it a look, it’s almost useless right now, the basic structure for the script is there, but there’s almost no functionality.

    Also fool-proofing it is a lot harder than I initially thought it was, there’s a lot of room for mistakes now and I’m trying to take care of all of the possibilities.

    Thanks, and as usual, if you have any ideas, I’m listening.

    yeah just seems no easy way to automate and fool proof. ??

    ok found myself back here again

    What else could I need?

    stuff like this would be nice.
    set permalinks to post-name
    auto utc time
    commenting on
    populated list of update services
    default static front page to welcome page.
    update all discussion settings

    Thread Starter danixland

    (@danixland)

    this all looks like sql stuff to me, if you want to do it on install your best bet is to write a small mysql script and run it after the 5 min setup, this way the database will be populated and you’ll just have to edit those settings that you want to modify.

    This is one of the various methods that you have to run a mysql script
    mysql -hhostname -uuser database < path/to/test.sql

    but you could also run it through phpmyadmin if it is available.

    Thread Starter danixland

    (@danixland)

    Hello everyone, just a quick update..
    The script I’m writing keeps growing and now supports installing and maintaining up to date a local cache with WordPress code pulled from svn as well as a few plugins (those recommended by the developer plugin). The script has also the ability to install and upgrade Virtual Hosts easily.

    If anyone is interested the script is located on github, give it a look and let me know..

    just curious. still learniong the way of apache ??
    i can setup a template in my skeleton directory that will load a basic html site for client upon account activation, are u saying that i can uplaod this bash to the temp and when they activate an account it will auto install wordpress bypassing quick install and all?

    Thread Starter danixland

    (@danixland)

    it depends on how the system is setup, if your system allows you to enqueue a shell script to the user creation routine, my script could be easily modified to setup WordPress for your system.

    I have no idea what is running on your server, so I can’t tell if it’ll work right away or maybe you’ll need to make some adjustments to make it work.

    Thread Starter danixland

    (@danixland)

    Just a little update everyone,

    The basic functionalities for the script are all working, which means that you’re able to create a cache directory and keep it up to date and of course add, update and delete a VirtualHost.

    I’ve updated it so that it’s now possible to use either a single file to keep all the VHost entries for apache, or use a separate directory and add a single configuration file for every site.

    If you have a LAMP server where you want to test it, grab a copy from github and give it a go, and let me know if you have any questions or concerns.

    I’ll keep you updated on this thread. cheers.

    like

    Thread Starter danixland

    (@danixland)

    Hello everyone,

    I’ve updated the script again, you’ll find the latest code on the branch iss2 and you’ll be able now to execute a complete backup of a VirtualHost created with wp_manager.

    I hope this turns out to be useful to someone.. ??

    Hi dani,great work m8, will this script run on shared, or do i need to be dedicated or running local?

    Thread Starter danixland

    (@danixland)

    Sorry for the late reply,
    it depends on how the server is set up. basically if you have the right permissions, aka you can alter the Apache configuration, it should work everywhere.

    ??

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘LAMP automated WordPress local environment. Suggestions?’ is closed to new replies.