Nov 06, 2018 The MAMP application window will appear with options to try MAMP Cloud as well as the button you’ll click to Start Servers later. The server status lights in the upper right corner will let you know when the servers are running by turning green.
By the current time, MAMP had released a version for Windows. This helps Windows users have one more option set up an Apache localhost easily. So that, you can focus on coding some PHP instead of spending so much time setting up your localhost. The biggest advantage of MAMP is you just need to install and use with least manual config. MAMP Application After Being Installed. At first, you may see a popup window persuading you to activate the Pro version; however, you are free to ignore it. Configuration To create localhost with MAMP? 4.1.Configuring the Ports. On the application window, click Preferences and select the Ports tab in the opened prompt. As you can see, we. MAMP (Mac, Apache, MySQL, PHP) is a free and premium local server environment that can be installed on the macOS and Windows operating systems. The free version of MAMP provides all the tools you will need to run WordPress on your PC for testing and development purposes. Dec 21, 2017 Setup Local Web Server on Windows 10 & MacOS with MAMP By Ghulam Abbas On Dec 21, 2017 For the web server, a localhost is a standard hostname which is provided to the address of your local computer, it means your computer is your web server. Setting a local web server allows you to do your experiments without harming anyone’s hope.
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.
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.
Localhost Mamp Mac
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
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.
Mamp For Windows
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.
For the web server, a localhost is a standard hostname which is provided to the address of your local computer, it means your computer is your web server. Setting a local web server allows you to do your experiments without harming anyone’s hope. There are many Platforms by which you can setup local web server on windows 10. The best of them is WAMP because that is free. But unfortunately, WAMP is only available for Windows. But Mamp is available for both Windows and Mac. Wamp and MAMP in a local computer work perfectly, but their setting is little different from each other. That’s why today, I will show you How to setup localhost on Windows using MAMP. Not only that, at the end, I have also introduced, How to setup localhost on MacOS High Sierra using MAMP. I hope You will enjoy it.
Related Posts:
Setup Localhost on Windows 10
Step 1. To setup localhost first, download Mamp from its site. It is free but if want the complete features, you have to buy the pro version.
Step 2. Double click on the setup and start the installation process. The installation process is so easy, all you need is to select your language and click next, next up to the last window.
After installing MAMP, it depends on you, which platform you need to work on, but I’m setting up WordPress. Download WordPress from wordpress.org and follow the procedures.
Step 3. Extract WordPress htdocs inside the MAMP folder where you have installed. In this case, I have installed MAMP in Drive C:mamphtdocs
Step 4. Now run the MAMP application which you have installed.
Note: If you manually want to set up the preferences, select preferences and create your custom settings. But, I’m not interested in, I will go to the Default settings.
Step 5. Now select start the servers.
Step 6. When the server started select open start page or you can search for it manually localhost/mamp on the browser.
Create Database for Installing WordPress
Many users are having trouble with installing WordPress. The only reason is the database, which manually must be created inside the server. Otherwise, you won’t be able to use the local web server services. So, to install the WordPress, there are two ways which can perform to created data in order to install WordPress.
- Just create a simple database on the server.
- Create a new user, which will its own database.
Step 1. When you open the localhost/mamp, select Tools> PHPMyAdmin.
Step 2. Click on the database and create a new database. Name it whatever you want, I will name it WordPress.
Localhost Mamp
Note: If you want to create a new user, head over to users and create a new user with the custom name and password. I suggest you create a new user because the basic method name and password is root which everyone knows. If you create a custom user, no one knows what your password is.
Install WordPress on Windows 10 Using MAMP
Step 1. Open a new tab and search there for localhost.
Step 2. Under the index selected, WordPress and the process of installing WordPress starts.
Step 3. Now you have to type the name of the database and the password. If you have just created a database username and password is root, just type the database name and submit.
Step 4. Select run the installation.
Step 5. Now fill out the information for your local site. When you are done click install WordPress.
Step 6. Once the installation goes successfully, login and enjoy the localhost.
If you are using Apple OS, Again MAMP can do the job. Download the MAMP package and start installation. Installing MAMP on is also so easy. Believe you will do it perfectly. After installing open MAMP by visiting the applications or open it from Launchpad.
Download WordPress and paste that into the htdocts folder located in MAMP folder. If you are struggling to find it, just search in the spotlight for htdocs. When it appears, extract the WordPress in it.
Localhost/mamp/ Language=english
Other steps are the same as I explained. Just visit the MAMP application and select open the web or search in safari localhost/mamp. Then select tools and create a new database or create a new user. After that search for localhost/WordPress and install WordPress.
Also Read: Get macOS Mojave Features on WIndows 10
Localhost:mamp/wordpress
Conclusion:
This was all about How to Setup Local web server on Windows 10 and MacOS High Sierra Using Mamp. I hope this Article was helpful to You. If you have any idea or suggestion Please comment on the article or visit the Forum.