Instant WordPress Development With WAMP

Instant WordPress Development With WAMP

Tutorial Details
  • Program: WAMP Server and Installer script for WordPress
  • Difficulty: Easy
  • Estimated Completion Time: 30 minutes

Speed up WordPress development by combining WordPress with WAMP. This tutorial will show you how to add a direct WordPress install of the latest version from within the WampServer. This will cut down on development time as well as supply you with a new fresh version of WordPress and a database all in one shot.

The WordPress script was created by “Ohad Raz from Bainternet“, if you have a chance you should check out all of the plugins and scripts that he has written for WordPress. Just to list a few, Options panel, Shortcodes UI, Simple QR codes and of course the Simple WordPress Auto Installer.


Step 1 Gathering the Required Elements

When this tutorial is done you will have WampServer installed and the script for Simple WordPress Auto Installer married together within the WampServer for instant WordPress development.

WAMP is an acronym for the contents of a web server package containing (in the case of WordPress development) Windows, Apache, MySQL, and PHP.

First let’s gather a few items so that we can make this happen.

  • WampServer – It can be downloaded for free and it is open source. Download the 32 bit or 64 bit version depending on your version of operating system. That can be found by going to “Start”, then click on “Programs” and chose the “Accessories” folder, then click on “System tools” and click on “System information”. There it will list whether you are running a 32 bit or 64 bit version of Windows. Download WampServer.
  • Simple WordPress Auto Installer – It can be downloaded for free on GitHub and it is open source. Simple WordPress Auto Installer

“This is a great tool for speeding up your local WordPress development.”

Here is a screen shot of what the Simple WordPress Auto Installer will look like when completed.

Screen shot of Auto Installer

The Auto Installer will allow the following choices for your install.

  • From the three choices below you will check only one
    • Download latest version
    • Hebrew Install
    • Last nightly build
  • Folder to create: “Here you will enter the name of the folder for WordPress to be installed into”
  • Database server (localhost?): “By default it will be filled with “localhost”, if different change the server name”
  • Database Name: “Here you will enter the database name”
  • Database User Name: “Here you will enter the database user name”
  • Database User Password: “Here you will enter the database password”

Now that you have a little background of what the WordPress Auto Installer looks like go ahead and download it and WampServer if you don’t already have it installed.


Step 2 Installing the Simple WordPress Auto Installer

The first order of business is to download the two items and install WampServer first. Once you have WampServer installed and working on your computer you will move onto the 2nd install of the Simple WordPress Auto Installer.

If you have any problems with the WampServer install, the WampServer web site has excellent documentation as well as an active forum. Usually the install is pretty straight forward and quick.

Here is what your download from GitHub for the Simple WordPress Auto Installer

Now Lets Add the “Simple WordPress Auto Installer ” To Our WampServer Install

Here comes the easy part, simply drop a copy of the installer.php file into the www root directory of WampServer. To find that you will need to go to your taskbar and click on the icon to open, then click on Computer, then click on your C: drive if thats where you installed WampServer. Then click on Wamp, then click on www, that is the root of the WampServer directory where you will house all of your development folders. See Screen shot below.

Now that the folder is open you can copy and paste the installer.php file that you have from the download of “Simple WordPress Auto Installer” from the GitHub file you downloaded earlier.

And now you should see the installer.php file inside of the www directory inside of the WampServer install.


Step 3 Fire Up the Engine

Now that that is out of the way, we are ready to fire up the WampServer and test our work.

Click on your WampServer icon and start all services, once the server icon turns green click on the “localhost” tab or type in your favorite browser “http://localhost/installer.php” and click enter. Below is what you should see now

“This is where the magic happens.”

Screen shot of Auto Installer

Step 4 Go Develop With WordPress on WampServer

So now that you have everything installed the next time you need to start a new development project with WordPress locally all you have to do is type in http://localhost/installer.php and enter the items in the boxes and you’re ready to go. No need to go download the latest version of WordPress then move the files to WampServer, then set up a database in phpMyAdmin and no need to setup the config file… this will do it all!


References

Note: Want to add some source code? Type <pre><code> before it and </code></pre> after it. Find out more
  • http://nige.do nigedo

    Kudos to bainternet for creating this useful tool.

    I wish I didn’t have to scan all the way through the article to find out what the tool actually does though.

    In the last sentence; “No need to go download the latest version of WordPress then move the files to WampServer, then set up a database in phpMyAdmin and no need to setup the config file… this will do it all!”

    • jim
      Author

      The tutorial tells you what it will do in the first paragraph

  • http://veento.com Mariano Miguel

    That’s cool. Thing is, to make your overall WordPress Development Workflow you need to use version control, and it gets even better when you use Capistrano for deployments. It literally improved my workflow A LOT. Give it a try.

  • http://LeWordpress.fr Soufiane

    Didn’t work for me : Fatal error: Call to undefined function curl_init() in Z:00\wamp\www\installer.php on line 160

    Did remove a semicolon in the php.ini then got this second error :

    Fatal error: Class ‘ZipArchive’ not found in Z:00\wamp\www\installer.php

    Great idea though :)

  • http://en.bainternet.info bainternet

    Nice to see this little script being used, and thanks for the kind Words.

    @Soufiane,
    The error you are getting means that your curl extension is not enabled.
    if you are using WAMP Then simply click on the “W” icon in your task bar >> php >> php extensions>> php_curl and it should work.

    • http://en.bainternet.info bainternet

      @Soufiane,

      Sorry didn’t read your comment all the way, just enable php_zip extension.

    • http://LeWordpress.fr Soufiane

      Well I managed to get it working after having another problem with the data base password :)

      Thanks for this great script.

      • Jim
        Author

        If you are on Wampserver usually you will need to leave that field blank

    • Evan

      Looks like a very handy script, do you know how this could be done with XAMPP?

  • http://28inch.co.uk 28inch

    It`s really cool! On the other hand, multi site seems even more simple to me. I like the nightly build option though.

  • adhguys

    Still not working for me. Enabled both php_curl and php_zip. Now I get two warnings:

    Warning: rename(C:\WAMP Server\www/wordpress,C:\WAMP Server\www/TLVC) [function.rename]: Access is denied. (code: 5) in C:\WAMP Server\www\installer.php on line 189

    Warning: mysql_connect() [function.mysql-connect]: Access denied for user ‘adhnetwo_adh’@'localhost’ (using password: YES) in C:\WAMP Server\www\installer.php on line 206

    I’d love to get this working – any ideas to fix this?

  • Pingback: Instant WordPress Development With WAMP | Shadowtek Hosting and Design Solutions

  • tanuyu

    What should we use? WAMP or Vertrigo. I’m using Vertrigo, and feeling good. Should i change?
    Sorry about my english

    • http://28inch.co.uk balazs sziklai

      I don`t know anything about Vertigo but if it`s working for you there is no point to swap.

  • Jhon

    I would really like a tutotrial on setting up local multisite in wordpress, I have search but haven’t found anything, hint hint wptuts, thanks.

  • Oskar

    A comparison with Web Matrix would be nice. It’s very easy to set up and use.

  • Crssp

    Anybody familiar with this install script, no how it would play, if it were dropped into the Xampp htdocs folder.
    I have a portable Xampp folder, where nothing is installed, you just click the control panel exe in Xampp and fire up mySql and the Xampp server manually.
    Can the install script work it’s magic, or would changes need to be made to the script?
    Thanks.

  • http://www.ndzynes.com Nathan

    Any benefit of using WAMP instead of XAMMP? Or is WAMP simply an alternative solution?

    • http://28inch.co.uk balazs sziklai

      More or less the same. Wamp is windows only

  • Pingback: More on Plugins for WordPress and SEO | Open Knowledge

  • adhguys

    Got it working! I added the php_curl setting as advised. I then realized that when using WAMP server, the user name must be “root.” Once I did that, everything worked.

    Thanks for a great script. This makes the process soooo much easier.

  • http://surefirewebservices.com Jonathan

    How about we step up the simple factor a notch and put this on display:

    http://www.instantwp.com/

    Shazam!! For quick wordpress on the go!!!

    Unfortunately it only works for PC’s but that’s fine with me!!! =D

  • Pingback: Google Alert - WordPress Jobs » Blog Archive » Wordpress Theme

  • Pingback: HostNine Weekly Round-Up: 5/21- 5/25 | HostNine Company Blog

  • Pingback: Tweet-Parade (no.21 May 2012) | gonzoblog.nl

  • Anthony

    I am getting the following error

    “Fatal error: Call to undefined function curl_init() in …\wamp\www\installer.php on line 251″

    I do have the extension php_curl enabled.

    Any other suggestions?

  • John

    I’m getting an error too – “ Fatal error: Call to undefined function curl_init() in C:\wamp\www\installer.php on line 251″

    I have php_curl enabled.

  • Stuart

    I get the same error as Anthony and Jon

    “Fatal error: Call to undefined function curl_init() in …\wamp\www\installer.php on line 251″

    and I made the corrections to

    C:wamp\bin\php\php5.3.13\php.ini

    C:wamp\bin\apache\apache2.2.22\bin\php.ini

    ie removing the ; from the the beginning of the line.

    and checked

    ; Directory in which the loadable extensions (modules) reside.
    extension_dir = “C:\wamp\bin\php\php5.3.13\ext”

    making sure that is correct as well, still with no joy!!!

  • http://blog.sklambert.com Steven Lambert

    For everyone who has been getting the Fatal error calls to their curl_init() function, after making sure that your curl function is enabled, try downloading it as described here:

    http://pioneear.wordpress.com/2012/06/11/wamp-server-2-2-windows-7-64-bit-and-curl-not-working-side-by-side-configuration-incorrect/

    It seems that apache is shipping with a broken php_curl.dll file which fails to load when apache first starts up. This finally got it working for me, and after restarting apache, I just had to set the function_timeout to 60 in one of the php.ini files and it finally worked.

  • Pingback: Speed up your Development Process - Programming Tutorials, Tips, and Tricks

  • http://wpdevhub.com Pali Madra

    I get the following error

    “Warning: mysql_connect() [function.mysql-connect]: Access denied for user ‘wptestinstalluser2′@’localhost’ (using password: YES) in C:\wamp\www\installer.php on line 41″

    wptestinstalluser2 is the username and seems like access issue for the user that is created in the process.

    When I checked WordPress had been downloaded but the database was not created therefore access was not provided when an attempt was made to access the database using the credentials of the new user.

    Anyone had similar problems?

    PS: I had to change the max_execution_time in php.ini to something higher than 30 seconds.

  • Gunnar

    Having the same problem with the script not being able to setup the database.

    ( ! ) Warning: mysql_connect(): Access denied for user ‘usr’@'localhost’ (using password: YES) in C:\wamp\www\installer.php on line 410
    Call Stack
    # Time Memory Function Location
    1 0.0006 315880 {main}( ) ..\installer.php:0
    2 9.2420 343984 create_db( ) ..\installer.php:198
    3 9.2420 344072 mysql_connect ( ) ..\installer.php:410
    Could not connect: Access denied for user ‘usr’@'localhost’ (using password: YES)

    • Gunnar

      Okay I feel dumb. The Database username and password it asks for refers to the username/password for your overall wamp MySQL install. For a fresh unaltered WAMP install this equates to

      Username: root
      Password:

      there is no password on a fresh wamp install so you can leave it blank!

      After I installed the updated curl extension file found here (as noted in a comment above, thanks Stewart): http://pioneear.wordpress.com/2012/06/11/wamp-server-2-2-windows-7-64-bit-and-curl-not-working-side-by-side-configuration-incorrect/

      Enable the Curl and Zip extensions in the php > extensions menu under WAMP, restart the services and you should be good to go.

      You may have to also set your timeout to longer as some have had to do:
      max_execution_time in php.ini to something higher than 30 seconds.

      I set mine to 60.

      Cheers!

      Thanks again for the tutorial and the script. Though I think the tutorial should be updated with some of this information. I didn’t goto the comments right away and so I spent at least a half hour messing around with stuff first… could have saved some time!

  • Pingback: WordPress: The ultimate power of blogging | W3Programmers.com

  • Pingback: WordPress Theme Development (Part-1): Fundamentals of a WordPress Theme | W3Programmers.com

  • GP

    I have no knowledge of programming and I am getting the error” Forbidden, you don’t have permission to access/ installer.php on this server. Can someone help me here

  • GP

    There are two problems I am struggling with, one is can’t access installer.php (no permission error) on browser through localhost and I type 127.o.o.1 to access it, and when I hit go on installer screen I get fatal error, please assist. error screen shot is attached.

  • GP

    There are two problems I am struggling with, one is can’t access installer.php (no permission error) on browser through localhost and I type 127.o.o.1 to access it, and when I hit go on installer screen I get fatal error, please assist. error screen shot is attached. (Sorry for wrong image attachment in last post)

  • Pingback: The French Connection - WebTekNeq's

  • http://www.facebook.com/mittul.chauhan Mittul Chauhan

    well it worked for me .. i have win xp 2 — wamp latest version ..

    curl enabled .. maximum execusion time is set properly ..

    and it worked for me .. i dont know y other fellows getting problems ..

    make sure the above things are fine ..