|NOTE: Before running the commands shown on this page, you should load the Bitnami stack environment by executing the installdir/use_APPNAME script (Linux and Mac OS X) or by clicking the shortcut in the Start Menu under "Start -> Bitnami APPNAME Stack -> Application console" (Windows). Learn more.|
|NOTE: When running the commands shown on this page, replace the installdir placeholder with the full installation directory for your Bitnami stack.|
Bitnami WAMP Stack provides a complete PHP, MySQL and Apache development environment for Windows that can be launched in one click. It also bundles phpMyAdmin and more.
First steps with the Bitnami WAMP Stack
Welcome to your new Bitnami application! Here are a few questions (and answers!) you might need when first starting with your application.
What are the system requirements?
Before you download and install your application, check that your system meets these requirements.
How do I install the Bitnami WAMP Stack?
Windows, OS X and Linux installer
Download the executable file for the Bitnami WAMP Stack from the Bitnami website.
Run the downloaded file:
- On Linux, give the installer executable permissions and run the installation file in the console.
- On other platforms, double-click the installer and follow the instructions shown.
Check the FAQ for instructions on how to download and install a Bitnami Stack for more details.
The application will be installed to the following default directories:
|Mac OS X||/Applications/APPNAME-VERSION|
|Linux||/opt/APPNAME-VERSION (running as root user)|
OS X VM
- Download the OS X VM file for the Bitnami WAMP Stack from the Bitnami website.
- Begin the installation process by double-clicking the image file and dragging the WordPress OS X VM icon to the Applications folder.
- Launch the VM by double-clicking the icon in the Applications folder.
What credentials do I need?
You need application credentials, consisting of a password. This will allow you to log in to the services of the Bitnami stack.
What is the administrator password?
- For Windows, Linux and OS X installers, the password was configured by you when you first installed the application.
- For OS X VMs, the password can be obtained by clicking the Bitnami badge at the bottom right corner of the application welcome page.
How to start or stop the services?
Bitnami native installers include a graphical tool to manage services. This tool is named manager-windows.exe on Windows and is located in the installation directory. To use this tool, double-click the file and then use the graphical interface to start, stop or restart services. Server log messages can be checked in the "Server Events" tab.
The Windows native installer creates shortcuts to start and stop services created in the Start Menu, under "Programs -> Bitnami APPNAME Stack -> Bitnami Service". Servers can also be managed from the Windows "Services" control panel. Services are named using the format APPNAMESERVICENAME, where APPNAME is a placeholder for the application name and SERVICENAME is a placeholder for the service name. For example, the native installer for the Bitnami WordPress Stack installs services named wordpressApache and wordpressMySQL.
These services will be automatically started during boot. To modify this behaviour, refer to the section on disabling services on Windows.
Which components are included in WAMP?
The Bitnami WAMP Stack ships the components listed below. If you want to know which specific version of each component is bundled in the stack you are downloading, check the README.txt file in the download page or in the installdir directory. You can also find more information about each component using the links below.
- PHP scripting language
- Apache Web server
- MySQL/MariaDB database server
- phpMyAdmin web application management tool for MySQL database
Frameworks for development (included in stacks with PHP 5.6 and lower):
- Zend Framework
Dependencies and additional components:
- ImageMagick tool
- SQLite database
- ModSecurity module
- XDebug module
- Xcache module
- OAuth module
- Memcache module
- FastCGI module
- APC module
- GD library
- OpenSSL library
- CURL library
- OpenLDAP library
- PEAR and PECL package manager tools
How can I deploy my PHP application?
The main directory to deploy your PHP application is installdir/apache2/htdocs. You can copy your PHP application files to that directory and access the application via your browser at http://localhost/.
How can I check the PHP configuration with phpinfo?
Some versions of the Bitnami WAMP Stack include a docs/ folder in the installation directory that contains some PHP examples. Among these is a phpinfo.php script that shows the current PHP configuration and is typically used to check that PHP was installed correctly. In order to be able to access it, follow these steps below:
Copy the phpinfo.php script from the installation directory to a publicly accessible location under the Web server document root.
$ cp installdir/docs/phpinfo.php installdir/apache2/htdocs
Browse to http://localhost/phpinfo.php.
You should see something like the page below, which contains detailed information on your PHP deployment.
How can I add applications on top of WAMP?
You can install several application modules on top of WAMP. That way, all of the Bitnami-packaged applications you want to run will share a single instance of Apache, MySQL or PostgreSQL (depending on the stack) and PHP, which will save space and improve performance.
You can download and install any PHP-based Bitnami application on top of an existing Bitnami WAMP Stack deployment. Find a list of all the supported application modules.
|NOTE: You can only install PHP-based application modules on Bitnami WAMP Stack.|
When installing an application module with the native installer, you can double-click it to start the installation process.
Change to the directory containing the downloaded module and double-click the module file to start the installation process.
During the installation process, you will need to specify the installation directory of your Bitnami WAMP Stack. The installation directory is the one selected by you during the Bitnami WAMP Stack installation process.
During the installation process, you will also need to specify the database administrator's password (the password for user root for MySQL databases and user postgres for PostgreSQL databases). The password is the one specified by you during the Bitnami stack installation process.
During the installation process, you will also be prompted to create an administrator account for the application, by providing a user name and/or an email address. Some application modules may also ask you to specify a password.
NOTE: If not specifically prompted for a password, the default administrator password for the application is automatically set to the same value as the database administrator's password provided in the previous step. This default administrator password can be changed at any time through the application's Web administration panel or Web dashboard, after the module has been successfully installed.
After the installation process is complete, access the installed application by browsing to http://localhost/APPNAME. For example, if you have installed WordPress, you can access it at http://localhost/wordpress. To access the application's administration panel or Web dashboard, use the application administrator account credentials set during the module installation process.
To run the installed application module using a virtual host instead of at http://localhost/APPNAME, use the conf/httpd-vhosts.conf Apache configuration file included with the module following the instructions to configure your application to use a virtual host.
How to create a full backup of WAMP?
The Bitnami WAMP Stack is self-contained and the simplest option for performing a backup is to copy or compress the Bitnami stack installation directory. To do so in a safe manner, you will need to stop all servers, so this method may not be appropriate if you have people accessing the application continuously.
|NOTE: If you want to create only a database backup, refer to these instructions for MySQL and PostgreSQL.|
Follow these steps:
Stop all servers using the shortcuts in the Start Menu or the graphical manager tool.
Create a compressed file with the stack contents. You can use a graphical tool like 7-Zip or WinZip or just right-click the folder, click "Send to", and select the "Compressed (zipped) folder" option.
Download or transfer the compressed file to a safe location.
Start all servers using the shortcuts in the Start Menu or the graphical manager tool.
Change to the directory containing your backup:
$ cd /your/directory
- Stop all servers using the shortcuts in the Start Menu or the graphical manager tool.
Uninstall the previous services by executing the following command:
Create a safe folder named Backups in the desktop and move the current stack to it. Remember to replace PATH with the right location of your folder:
$ move installdir \PATH\Backups
- Uncompress the backup file using a tool like 7-Zip or Winzip or just double-click the .zip file to uncompress it, and move it to the original directory.
Install services by running the following commands from an elevated command prompt:
$ cd installdir $ serviceinstall.bat INSTALL
- Start all servers using the shortcuts in the Start Menu or the graphical manager tool.
How can I run a custom PHP script?
Add your PHP script to the installdir/apache2/htdocs/ directory, then browse to it via the URL http://localhost/FILENAME.php, where FILENAME is the name of the PHP script.
For an example, refer to the section on using phpinfo.
|NOTE: If your script file is named index.php, then you must access it using the URL http://localhost/index.php and not http://localhost. This is because the Apache server included in the AMP stack is configured to recognize both index.html and index.php files by default, but to give the included index.html file priority. To alter this behaviour, simply move the installdir/apache2/htdocs/index.html file to a different location.|
What are the "development" and "production" modes for applications?
Some applications can be configured in either "development" or "production" mode:
- Production mode: File permissions and configuration settings are set with security and performance in mind. Installing certain plugins, themes and updates may require manual changes or installation of additional services like FTP.
|TIP: This mode is recommended if the stack will be deployed on a public server.|
Applications are configured using production mode for cloud servers by default.
If you install a module or stack and select production mode, these applications will request an FTP account in order to download their extensions. If you already have an FTP server on your machine, use this mode.
- Development mode: File permissions and configuration settings are not optimal from a security standpoint but make it easy to install plugins, themes and updates for certain applications.
|TIP: This mode is recommended for development purposes or for use on a private company network or intranet.|
How to create a custom PHP application?
Many users run a Bitnami stack as a development environment for their own PHP projects (as opposed to running third-party applications such as Joomla! or WordPress). To deploy your PHP application in this environment, you have two options:
To make a single PHP application accessible at the root URL of the Web server (for example, http://localhost), simply copy the PHP files into the installdir/apache2/htdocs folder. For an example, take a look at the phpinfo example.
To have several applications running, create the same structure used by Bitnami when installing Bitnami PHP applications. Recent versions of Bitnami stacks ship a demo application with this structure to help you get started. To use this, follow the steps below:
Launch an elevated Windows command prompt.
Copy the installdir/docs/demo folder into the installdir/apps directory.
$ copy installdir/docs/demo installdir/apps
Add the following line to the end of the installdir/apache2/conf/bitnami/bitnami-apps-prefix.conf file:
Restart the Apache server using the graphical manager tool.
You should now be able to access the demo application at http://localhost/demo. You should see a "Hello world" message in your browser.
If your stack does not include a demo application, or if you prefer to create a custom PHP application from scratch, follow the steps below. These steps assume that your application will live in the installdir/apps/myapp/ directory:
Launch an elevated Windows command prompt.
Run the following commands to create the directories:
$ mkdir installdir/apps/myapp $ mkdir installdir/apps/myapp/htdocs/ $ mkdir installdir/apps/myapp/conf
Create and edit the installdir/apps/myapp/conf/httpd-prefix.conf file and add the line below to it:
Alias /myapp/ "installdir/apps/myapp/htdocs/" Alias /myapp "installdir/apps/myapp/htdocs/" Include "installdir/apps/myapp/conf/httpd-app.conf"
Create and edit the installdir/apps/myapp/conf/httpd-app.conf file and add the content below to it. This is the main configuration file for your application, so modify it further depending on your application's requirements.
<Directory installdir/apps/myapp/htdocs/> Options +FollowSymLinks AllowOverride None <IfVersion < 2.3 > Order allow,deny Allow from all </IfVersion> <IfVersion >= 2.3> Require all granted </IfVersion> </Directory>
NOTE: If your application uses .htaccess files, you should change the AllowOverride None option to AllowOverride All. Find out how to move the .htaccess file content to the main server configuration file.
Once you have created the files and directories above, add the following line to the end of the main Apache configuration file at installdir/apache2/conf/bitnami/bitnami-apps-prefix.conf, as shown below:
Restart the Apache server using the graphical manager tool.
You should now be able to access the application at http://localhost/myapp.
How to find the database credentials?
- Database username: root.
- Database password: The password entered during the installation process.
How to connect to the MySQL database?
You can connect to the MySQL database from the same computer where it is installed with the mysql client tool.
$ mysql -u root -p
You will be prompted to enter the root user password. This is the same as the application password.