MAMP for Windows MAMP is a free, local server environment that can be installed under macOS and Windows with just a few clicks. MAMP provides them with all the tools they need to run WordPress on their desktop PC for testing or development purposes, for example. You can even easily test your projects on mobile devices. (The 8888 port shown is the default MAMP port. You can change that as desired, but it works for me.) MAMP setup tutorial: Summary. I hope this MAMP setup tutorial has been helpful. As you can see, you just need to edit two files and you should be in business. MAMP is a terrific Mac PHP development tool. Double-click the MAMP folder and you will see the directory of files available for the MAMP software. Find htdocs, and click and drag that folder to your sidebar in your finder window. This is where all of your testing site files will be stored, so this will make it easy to find this folder in the future. MAMP is a one-click-solution for setting up your personal web server. MAMP installs a local server environment in a matter of seconds on your computer. MAMP (macOS) — Download offline version MAMP (Windows) — Download offline version.
AMP packages are operating system-specific. The most common ones are:
XAMPP for Windows.
The LAMP package compatible with the Linux distribution used.
MAMP for macOS.
It is recommended that you use version 1.7.1 or later.
The installation procedure depends on the operating system used, follow the installation instructions provided.
If you are using Windows Vista, avoid installing the package in the Program Files folder. This folder is write-protected by default, which means that no files can be placed on the server and further processed by the PHP engine.
Install and configure an AMP package
Download and install the desired AMP package.
Use the AMP control pane to start the components.
If the web server does not start, most likely a port conflict takes place. By default, the Apache HTTP server listens to port 80. This port can be already used by other services, for example, Skype. To solve the issue, update the server configuration file as follows:
Locate the line
Listen 80
and change it to, for exampleListen 8080
.Locate the line
ServerName localhost:80
and change it accordingly, in this example toServerName localhost:8080
.
Save the configuration file and restart the Web server.
To check your installation, open your browser and type the following URL address: http://localhost:<port number>. The AMP welcome page appears.
Integrate an AMP package with PhpStorm
Configure a local interpreter as described in Configure local PHP interpreters.
Install and configure a debugging engine as described in Configure a debugging engine.
Configure integration with MySQL server as described in MySQL.
MAMP is the macOS package comprising Apache HTTP server, MySQL database, PHP interpreter, and some libraries. The word 'MAMP' is an acronym, where 'M' stands for 'Macintosh', meaning it's designed for macOS, and the other letters stand for the package components.
MacOS comes with the pre-installed PHP interpreter and Apache server, which can be configured to work well together following the tutorial published by php.net. PhpStorm-related configuration is similar to the one described in this tutorial. Since installing additional packages and configuring the system environment on your own can be tricky, this guide describes how to get everything set up at once easily in a separate environment with complete MAMP package.
is a reliable and fast way to set up an environment for PHP programming. It provides all the components required for developing, running, debugging, and unit testing of PHP applications. is a good alternative to installing and configuring a Web server, a PHP engine, a database server, and a debug engine separately. To start developing, you will only need to download and install , and start the components using the control panel.
Downloading and installing MAMP
Download and install MAMP from the MAMP Downloads page. Once the MAMP archive is downloaded, unpack it and run the installer. The MAMP installation wizard is pretty straightforward, you only need to proceed through the installation steps.
Having installed MAMP and launched its components, we now need to tell the IDE where these components are stored and how they are configured.
MAMP Control Panel
After installation, use the MAMP Control Panel to perform such actions as starting or stopping servers and changing configurations. The MAMP Control Panel application can be found in the Applications/MAMP folder.Starting and stopping servers
To start the Apache and MySQL servers, click the Start Servers button.
FET is an acronym for federal excise tax. It refers to the tax imposed by the federal government on tires used on the road with a maximum load capacity greater then 3500 pounds. Generally this applies to medium truck tires and heavy duty trailer tires. Fit and Finish A small car with big attitude, the Honda Fit is the right mix of modern sport styling and aerodynamic efficiency. Fet car. The OptiMOS™ automotive MOSFETs offer you a high quality that is achieved with robustness, enhanced testing and qualification of each product. Automotive MOSFETs are available in n-channel and p-channel polarity with a wide voltage range from 20 V up to 800 V and diversified packages. P-Channel MOSFET is available in a range from 30 V up to 40 V.
The icons in the top-right corner will become green-colored. Once the servers are started, you can stop them at any time by clicking the Stop Servers button.
The Start Page (http://localhost:8888/MAMP/ by default) will open in the browser. This page contains the information about your environment and provides useful links.
To configure MAMP, click the Preferences.. button.
Several options are available:
Modify the Start/Stop Servers configuration on the Start/Stop tab.
Specify the Apache and MySQL ports on the Ports tab.
Specify the PHP version and caching options on the PHP tab.
Set the web server document root on the Web Server tab.
Integrating MAMP with the IDE
Integrating the PHP executable
Let's start by registering the PHP executable from MAMP in PhpStorm. In the Settings/Preferences dialog Ctrl+Alt+S, navigate to PHP.
With PhpStorm, we can have several separate PHP interpreters registered in the IDE, depending on the PHP version or PHP configuration needed for the project. All currently registered installations of PHP interpreters are displayed in the CLI Interpreter list:
Add the interpreter installed with MAMP
Click to the right of the list. The CLI Interpreters dialog opens.
In the left-hand pane, click the button on the toolbar.
In the Name field, type the name to identify the current installation, for example MAMP PHP 7.1.
In the PHP executable field, specify the folder where the php (PHP executable) file is stored. Either enter the path manually or click and locate the file.
PhpStorm checks whether the specified folder contains a PHP executable file, detects the PHP version, and displays it in the PHP Info read-only field. PhpStorm also validates that the debugger is configured correctly.
We can now save these settings and select the newly added PHP interpreter for our project:
PhpStorm will now use the PHP installation that was bundled with MAMP.
Integrating the debugger
PhpStorm offers a powerful debugger in which breakpoints can be set and variables can be inspected at runtime. For more information on using PhpStorm's debugger, explore Debug with PhpStorm: Ultimate Guide.
Note that if you are using the latest MAMP PRO, the httpd.conf, php.ini and my.cnf files should be edited through the Template Editor provided by MAMP PRO. To edit the template files, navigate to File | Edit Template. When MAMP PRO starts the Apache and MySQL servers it uses these templates to create httpd.conf and php.ini files, erasing the previously created ones.
Once you have installed and configured the debugger, you can validate your debugging configuration by performing the steps described in Validate the Configuration of a Debugging Engine.
Integrating the Apache server
Interaction between PhpStorm with Web, FTP, and other servers is handled by the FTP/SFTP Connectivity plugin, which is enabled by default. The IDE accesses servers using the connection settings specified in the registered server access configurations.
Create and manage server access configurations
In the Settings/Preferences dialog Ctrl+Alt+S, click Deployment under Build, Execution, Deployment.
Click the on the toolbar, select the Local or mounted folder, and specify the name for the MAMP in the dialog that opens.
After clicking OK, we can specify the path of the Apache's web root /Applications/MAMP/htdocs and the URL of the web server, http://localhost:8888. Note that the actual settings depend on how you have configured the MAMP Apache server in the MAMP configuration or Apache configuration files.
Don't forget to mark the server as default by clicking , so that PhpStorm uses it with browser integration instead of the built-in web server. By clicking Open, we can open the MAMP htdocs folder in the browser and thus verify that the provided settings are correct.
Integrating the MySQL server
PhpStorm allows to connect to the MAMP MySQL database server using the Database Tools and SQL plugin, which is installed and enabled by default. Before you start, make sure that the MySQL server is running on the MAMP PRO Control Panel. If you are using MAMP PRO, also make sure that the Allow network access to MySQL checkbox is selected on the MAMP PRO Control Panel.
From the right-hand side of the IDE, open the Database tool window.
Here, we can create a new connection or Data Source by using the context menu or the toolbar button. We need to specify the JDBC database driver that will be used to connect to our database. For MySQL, we can use the MySQL Connector driver available in the list of drivers. PhpStorm doesn't ship these drivers but we can download the correct JDBC driver by clicking link.
Next, we need to enter the connection details. Alternatively, we can provide the connection string to the MySQL Database in the Database URL field, for example jdbc:mysql://localhost:8889/ or jdbc:mysql://localhost:8889/foodb to connect to the foodb database.
We can also specify the username and password for MySQL. By default, MAMP uses root both as the username and the password.
When using UTF-8 or unicode characters in the username, password or database name, two additional parameters must be added to the connection string: characterEncoding
and useUnicode
. An example connection string would be jdbc:mysql://localhost:8889?characterEncoding=utf8&useUnicode=true
. It may also be required to select a different JDBC driver from the list, that is, com.mysql.jdbc.NonRegisteringDriver
.
Having defined the data source, use the Test Connection button to verify the settings and make sure PhpStorm can connect to MySQL.
We can now create tables, run queries, update data and so on. See Database tools and SQL for more information.
XAMPP is a cross-platform package consisting of an Apache HTTP server, MySQL database, PHP interpreter, and Perl interpreter. The word 'XAMPP' is an acronym, where 'X' stands for 'cross', meaning 'cross-platform', and the other letters stand for the package components.
is a reliable and fast way to set up an environment for PHP programming. It provides all the components required for developing, running, debugging, and unit testing of PHP applications. is a good alternative to installing and configuring a Web server, a PHP engine, a database server, and a debug engine separately. To start developing, you will only need to download and install , and start the components using the control panel.
Downloading and installing XAMPP
Download and install XAMPP from the XAMPP Downloads page. Once the XAMPP archive is downloaded, unpack it and run the installer. The XAMPP installation wizard is pretty straightforward, you only need to proceed through the installation steps.
Having installed XAMPP and launched its components, we now need to tell the IDE where these components are stored and how they are configured.
XAMPP Control Panel
After installation, use the XAMPP Control Panel to perform such actions as starting or stopping servers and changing configurations.Starting and stopping servers
To start a specific server, click the Start button next to it.
By default, none of the servers such as Apache or MySQL are installed as Windows Services. This means that whenever we want to make use of these servers, we have to manually start them through the XAMPP Control Panel. When a server runs as a Windows Service, it with Windows automatically.
Run a specific server as a Windows Service
Open the XAMPP Control Panel as an administrator.
Stop the server you want to install as a Windows Service by clicking the Stop button.
Click X next to the server and confirm the service installation. Once the installation succeeds, a green checkmark will be displayed next to the server, indicating the server is now running as a Windows Service.
Integrating XAMPP with the IDE
Integrating the PHP executable
Let's start by registering the PHP executable from XAMPP in PhpStorm. In the Settings/Preferences dialog Ctrl+Alt+S, navigate to PHP.
With PhpStorm, we can have several separate PHP interpreters registered in the IDE, depending on the PHP version or PHP configuration needed for the project. All currently registered installations of PHP interpreters are displayed in the CLI Interpreter list:
Add the interpreter installed with XAMPP
Mamp Tutorial
Click to the right of the list. The CLI Interpreters dialog opens.
In the left-hand pane, click the button on the toolbar.
In the Name field, type the name to identify the current installation, for example XAMPP PHP 7.2.
In the PHP executable field, specify the folder where the php (PHP executable) file is stored. Either enter the path manually or click and locate the file.
PhpStorm checks whether the specified folder contains a PHP executable file, detects the PHP version, and displays it in the PHP Info read-only field. PhpStorm also validates that the debugger is configured correctly.
We can now save these settings and select the newly added PHP interpreter for our project:
PhpStorm will now use the PHP installation that was bundled with MAMP.
Integrating the debugger
PhpStorm offers a powerful debugger in which breakpoints can be set and variables can be inspected at runtime. For more information on using PhpStorm's debugger, explore Debug with PhpStorm: Ultimate Guide.
Once you have installed and configured the debugger, you can validate your debugging configuration by performing the steps described in Validate the Configuration of a Debugging Engine.
Integrating the Apache server
Interaction between PhpStorm with Web, FTP, and other servers is handled by the FTP/SFTP Connectivity plugin, which is enabled by default. The IDE accesses servers using the connection settings specified in the registered server access configurations.
Create and manage server access configurations
In the Settings/Preferences dialog Ctrl+Alt+S, click Deployment under Build, Execution, Deployment.
Click on the toolbar, select the Local or mounted folder, and specify a name for the XAMPP server.
After clicking OK, we can specify the path of the Apache's web root C:xampphtdocs and the URL of the web server, http://localhost. Note that the actual settings depend on how you have configured the XAMPP Apache server through the C:xamppapacheconfhttpd.conf configuration file.
Don't forget to mark the server as default by clicking , so that PhpStorm uses it with browser integration instead of the built-in web server.
By clicking Open, we can open the MAMP htdocs folder in the browser and thus verify that the provided settings are correct.
Integrating the MySQL server
PhpStorm allows to connect to the XAMPP MySQL database server using the Database Tools and SQL plugin, which is installed and enabled by default. Before you start, make sure that the MySQL server is running on the XAMPP Control Panel.
From the right-hand side of the IDE, open the Database tool window.
Here, we can create a new connection or Data Source by using the context menu or the toolbar button. We need to specify the JDBC database driver that will be used to connect to our database. For MySQL, we can use the MySQL Connector driver available in the list of drivers. PhpStorm doesn't ship these drivers but we can download the correct JDBC driver by clicking link.
Next, we need to enter the connection details. Alternatively, we can provide the connection string to the MySQL Database in the Database URL field, for example jdbc:mysql://localhost:3306/ or jdbc:mysql://localhost:3306/foodb to connect to the foodb database.
Note that it is recommended to change the default MySQL username and password after installing XAMPP, which can be done on the http://localhost/security/xamppsecurity.php page.
We can also specify the username and password for MySQL. By default, XAMPP uses root as the username, and a blank password.
When using UTF-8 or unicode characters in the username, password or database name, two additional parameters must be added to the connection string: characterEncoding
and useUnicode
. An example connection string would be jdbc:mysql://localhost:8889?characterEncoding=utf8&useUnicode=true
. It may also be required to select a different JDBC driver from the list, that is, com.mysql.jdbc.NonRegisteringDriver
.
Having defined the data source, click the Test Connection button to verify the settings and make sure PhpStorm can connect to MySQL.
We can now create tables, run queries, update data and so on. See Database tools and SQL for more information.
Utilizing a local development environment is crucial for web developers, but it's not well documented. This guide to setting up MAMP will show you how to create your own PHP development server & how to use MAMP efficiently once you're all setup.
Mamp Tutorials
This tutorial will walk you through setting up MAMP so you can take advantage of all the perks of having your own local PHP development server. While this workflow is guided towards folks using a Mac, the steps of the process are almost identical on other platforms. Having your own local development environment allows you to quickly plug through building a website or application without needing to consider all implications of having an accessible product online. We'll show you how to get started with the free version of MAMP, but it should be noted that the Pro version is pretty inexpensive and streamlines your workflow quite a bit. With that said, let's get started showing you how to use MAMP so you can get coding and testing websites like a boss!
Setting Up Mamp - Download & Install
The first step to setting up MAMP will be to download the latest version of MAMP (which is available at www.mamp.info). The only other application you'll need will be a simple text editor to manage the code. Text Wrangler, Sublime, TextMate, Jedit, or Coda would all do the job well and you could always just use Terminal if you're really hardcore. Once you've downloaded MAMP, click to install (you know the drill). After you've installed, take a quick look at the app in your Applications
folder. You'll notice that the app is in a folder structure and for future reference it's important to know that the htdocs
folder is the default home of your local development environment. The index.php
file is what you'll see as soon as you start it up.
What Exactly is a Local Development Environment?
What we're basically doing is creating our own 'internet' on your computer. The primary advantage that we're utilizing is the privacy and efficiency that this allows. By having your own 'internet' running (also known as a local server or local development environment), you don't need to worry about clients monitoring your revisions or even worse - breaking some part of a live website. The concept of a local testing server sounds complex, but really it just gives coders exactly what they need - Practice and privacy.
While the Mac version is called MAMP, the same functionality is offered on other platforms as 'WAMP' or 'LAMP'. you may notice a theme in the naming of these apps. In fact, the name tells you exactly what it is - Mac Apache Mysql PHP. Those last three are obviously the important ones here and if you don't know, those are the basic building blocks of a large majority of websites on the internet. Simply - Apache is your testing server, MYSQL is your database, and PHP is the coding language (which is since most major CMS's run on a PHP backbone - Wordpress, Joomla, Drupal, CodeIgnitor etc.). While that's obviously a simplistic explanation of how a PHP development server works, it does cover the functional aspects and brings us to an inherent problem you may be asking yourself.
IMPORTANT: When running the MAMP application, you are broadcasting a network. If you are connected to the internet while you're broadcasting, you're leaving your door WIDE open to hacker types.
Securing Your PHP Development Server
All MAMP applications come setup with the same username and password (hint: They're both 'root'). While you ideally would never have your Wifi turned on while you're running MAMP, it's best to assume that might accidentally happen. As you can probably imagine, 'broadcasting' your network to the public with a default user and password that would be any dev's first guess would be a bad idea. So the final step in our tutorial is addressing that problem.
Go ahead and turn off your wifi and start MAMP. Then go to your /Applications/Utilities
folder and open up Terminal. If you're not familiar with Terminal, don't be scared - just take your time and make sure you input this one part correctly. You're basically inputting where your app is located on your computer, then setting your new password in that last chunk. From your root, you'll need to type..
Mamp Tutorial Php
Once you hit enter, you'll be prompted for the current password (which is 'root'). As long as you don't get an error, you've successfully reset your root users password. The next file you'll need to edit is 'config.inc.php' that can be located at /MAMP/bin/phpmyadmin/config.inc.php. Open that file with your trusty text editor and look for the line that reads $cfg['Servers'][$i]['password'] = 'root';
. It should be near the 86th line down. Change that 'root' to your new password and save.
The last few files that you'll need to update are located in /MAMP/bin/. The file names are checkMysql.sh, quickCheckMysqlUpgrade.sh, repairMysql.sh, stopMysql.sh, and upgradeMysql.sh and it should look awfully similar to the image that's attached to the right. These files (as you can probably gather) handle the stopping, starting, etc. of MAMP and that's why they're important to edit. If you don't get around to fixing these, you can have a network running that you're not even aware of.. Which obviously isn't good (ps. I've also heard of some setups that require you do the same change to 'bin/mamp/index'). Now each of these files will have a line that reads -u root -p root
. This is simply a block stating 'Ok, this is the user and this is the password'. When replacing the 'root' password here, you do need to do one thing slightly different. When you replace the password, remove the space between '-p' and your new password (it should read -pNEWPASSWORD). Once you've edited these files, you have properly reset your root password and you're officially done setting up MAMP. Now, let's crank it up!
How to Use MAMP - Start it Up!!
You should have everything running now, so let's cover how to use MAMP itself. First - keep in mind that you still want to turn your network connection off when you're running MAMP. Resetting the password will allow you to remove your 'low-hanging-fruit' status, but you still don't want to broadcast publicly. In order to keep your URLs clean, you'll want to remove the ':8888' from your URL. To do that just open up MAMP preferences and click 'Set to default Apache and Mysql ports'(see picture). This allows you to tailor your URL structure like you would on a live website. You'll also notice that you can change your document root under the 'Apache' tab (otherwise it defaults to /MAMP/htdocs as we mentioned earlier.
Every setup is a little unique and if you'd like a video walk-through, check out the step by step process courtesy of Jono Young (@chsweb) posted below. Once everything is setup properly, you'll have a functional php development server for you to practice all your coding awesomeness on.. HTML, Wordpress, Drupal, Joomla, whatever you want. Now pat yourself on the back and getting working on that web project.
If you have any tips on setting up MAMP, please drop them to us on your favorite social network. If you found this tutorial helpful, please feel free to share some love with the buttons below. As always - Thanks for stopping by.
- Content distribution is an overlooked aspect of blogging, so we created this quick guide to mastering RSS. By identifying leading RSS feed formats, top RSS submission sites, and a few of the best RSS reader apps, we can make your audience even larger.
- Apple Security Tutorial - Secure Your Mac from HackersIn the old platform debates, Apple security was always featured as a primary selling point. The truth is technology has caught up to the giant and frankly - a lot of people are simply not using all the existing Mac OS X security tricks of the trade.
- Do you have Facebook fanpage envy? Get over it with this simple 7 step tutorial to build your own custom Facebook fanpage.
- Using Dropbox for web development is an easy way to share files across multiple local servers. This tutorial shows you how to setup a Dropbox database sync so you can trigger your MySQL database sync in the push of a button.
- Optimizing SEO can be a complicated task. Free site ranking utilities provide experienced web developers and newcomers alike, a helpful way to track progress and identify potential shortfalls.