How to Build a Joomla Testing Environment on Windows

In the next couple of weeks, I’m planning on developing a Joomla 1.5 module so that I can flex my PHP muscles and get some more experience developing for Joomla. As part of this, It will be very helpful to have a local environment where I can test out the component that I’m plan on making. The process of setting up a Joomla testbed isn’t that terrible. It basically involves setting up a copy of Apache and MySQL on your local machine then installing Joomla on top of that. Most of the server-setup can be streamlined by using a copy of WAMP.

Here’s how to build a Joomla testing environment on Windows:

(1) Download a copy of WAMP

The first thing you’ll need to do is get a copy of WAMP. This stands for “Windows Apache MySQL and PHP”. It essentially provides a set of web-development framework that combines all of the tools that you need for creating a PHP test-bed in a Windows environment. Since Joomla is based on PHP, WAMP is a perfect solution to run Joomla on top of. You can download the installation files from WampServer.com

(2) Install WAMP

You should have a copy of “WampServer2.0h.exe” on your system. Double click the file to open it. Work your way through the installation by clicking next and I agree as many times as you need. It’s okay to leave the installation directory to “C:\WAMP” unless you have a specific desire to move it anywhere else. If you have the Windows Firewall running on your system, you’ll receive a notice that it’s trying to access the web. You’ll want to make sure it’s “unblocked” otherwise it’s likely that your WAMP install will not function properly.

You will also be asked about SMTP information. Unless you have a specific need to do anything that involves sending emails from your web-server, it’s safe to leave those blank. If you are developing contact forms or somethign that would require credentials, you can get those from your internet service provider.

wamp-setup

(3) Take WAMP for a Test Drive

After installing WAMP, you have the option to start it up automatically. You can do this or launch WAMP from the start menu. You should be able to left-click on the WAMP icon in the system tray. You’ll get different options  to turn WAMP on and off as well as access various database and web-server management tools. For now, we just want to click on LocalHost to make sure the web-server is running properly. If all is well, you’ll see a page that says “WAMPServer” that has a white-background.

wamp-first-steps

(4) Download Joomla

To run a local copy of Joomla on our Windows/Joomla testbed, we’ll need to download the latest version from Joomla.org’s download page. You’ll want to download version 1.5 unles you have a specific reason to run Joomla 1.0. Be sure to get the “1.5.x Full Package” file.

(5) Extra Joomla to Your Website’s Root Directory

If you haven’t done anything special with your WAMP server, the root directory of your web-server should be located at “C:\wamp\www” on your system. First, delete the existing “index.php” file that’s sitting there then extract all of the Joomla files there.

(6) Setup a Database for Joomla to Run in

Left click your WAMP icon in the system tray then choose the phpMyAdmin option. This is a piece of software that lets you manage the database component of the WAMP stack. We need to setup a database for our local copy of Joomla to use. On the first screen you see, you’ll have the option of creating a database.

This is a screenshot of me creating a database called “JoomlaDB”

mysql-joomla

This is all you should need to do with phpMyAdmin for the setup process. Since it’s a local machine, we’ll just use the “root” login for our MySQL Server. If this was a production environment, you would want to create separate account to access your database.

(7) Run the Joomla Setup

After getting your files extracted, visit your local web-server by pointing your browser to http://localhost/ or by using the link in the WAMP  tray-icon and going to your “LocalHost” option. At this point, you’ll be at the standard Joomla setup process. The first three steps are straight forward, the only “hard” part is setting up the database. When you hit step three, use “Localhost” for the database server “root” for the mysql user, and leave the password blank. For the name of your database, enter in the name of the database you created in the previous step. In my example, I used “JoomlaDB” as my database name. You won’t need a database password since we’re developing locally.

joomla-database-settings

For step four of the installation, it’s okay to not enable the FTP layer since we are developing locally. On step five, you’ll need to pick out a name for your site, and create an administrative account. It’s probably a good idea to install the sample data package so that you have a base website to develop from.

If your install is successful, you should see a screen like this:

joomla-finish

(8) Delete Joomla’s “Installation” Directory

After finishing the Joomla install, you’ll need to go back to your “C:\WAMP\WWWROOT\” directory (or wherever you have it located) and delete the folder called “Installation” before using Joomla.

(9) Pat Yourself on the Back

After deleting the installation directory, browse to http://localhost/ again and if your install was successful, you should see a screen like this:

joomla-success

You now have everything you need to do to begin playing around with Joomla on your local machine. You can browse to http://localhost/administrator/ and login with the credentials you made during setup to get into the back-end of Joomla.

(10) Get Developing!

Once you get your Windows Joomla testing environment setup, start developing some modules, components, mambots, and the like. Here are some resources to help you get started with Joomla Development

Comments

  1. I’ve never heard of WAMP, I’ve always been pointed towards XAMPP by friends. Granted, I don’t use it much… Though I will be this summer.

  2. Hi Matt,
    Thanks for this tutorial. However I get the following error when I try browsing localhost :
    The webpage cannot be found : HTTP 404

    Can you please help?

    Many Thanks,
    San

  3. Amazing Blog! i visit you regularly!

  4. I want to know whether is possible to change developing of my joomla site from online to local using wamp? How do I make it work, continue developing my site locally?

  5. Thanks for the guide. Would there happen to be one that deals with setting up an local environment for a pre-existing website? There is a live site (based on joomla 1.5.21) that I would like to copy down for local testing and upgrades.

    Thanks again!

  6. Thank you for the sensible critique. Me & my neighbor were just preparing to do a little research on this. We got a grab a book from our area library but I think I learned more clear from this post. I am very glad to see such excellent info being shared freely out there.

Trackbacks

  1. […] this week, I wrote up a tutorial about how to make a testing environment for Joomla on the windows platform. I went through the instructions of setting up WAMP, making the database, and installing and […]

  2. […] how-to-build-a-joomla-testing-environment-on-windows and How to back up your website […]

Speak Your Mind

*