In this short tutorial, I will explain how to install a local WordPress site with MAMP. Installing a local version of WordPress allows you to fully design and modify your website in an offline environment while still making use of all the features of WordPress.
If you are setting up your first website it might be suitable to do this online immediately, but for bigger websites or redesigns, using an offline environment is more suitable. It allows you to keep your current website online and to work on a revamped website with new features offline and to upload this website later when your website is finished.
All the software mentioned in this tutorial is free and I will show you exactly where to get it and more importantly how to use it. So let’s get started! You can refer to the video below or read the written steps.
Don’t have a hosting account?
I use SiteGround for all hosting needs, Siteground hosting comes with the cPanel that makes it very easy to make changes to your mySQL database or manage your files in your browser. All my websites are hosted with SiteGround and for good reasons!
#1 Install MAMP
Head over to MAMP to download your free copy of MAMP for Mac or Windows. In this package, you will automatically receive a free trial for the Pro version, for this tutorial the free version suffices.
After you have downloaded your version of MAMP, run the installation and start the servers.
#2 Download WordPress
Head over to WordPress and download the latest version of WordPress to your computer. Unzip the file and leave it there for now.
#3 Create a Database and a Folder
If you open MAMP you can select the option ‘Open WebStart Page’, click this.
This should take you to the dashboard of MAMP on your local host. In the toolbar on the top, you can see the option tools, select phpMyAdmin.
Once you are in phpMyAdmin, click Databases and enter the name of the database you want to create. It is suggested to choose a name that would be easy to recognize later on. So for this website that would be: tropicalup.
Next step is that we are going to have to create a folder that will contain our website. On the MAMP start screen choose ‘Preferences’. If you click the tab web server you will see the location of folders of you offline installations.
As you can see above this is ‘htdocs’, if you click the arrow you will be automatically taken to this folder location.
Tip: If you plan to have more local websites in the future, bookmark this folder for easy access.
Within the folder ‘htdocs’ we will create a new folder, this will be the name of your website and ideally would match the domain name that you plan to use in the future. So for this website, I would create a folder ‘tropicalup’ that also matches the database we created earlier.
#4 Copy the WordPress files in the folder
Now that we have created the folder, copy the unzipped files of WordPress to the new folder. Only copy the contents of the WordPress folder and not the folder itself.
#5 Install WordPress
Now we are almost finished. Go to your localhost, by default, this is: ‘localhost:8888/’ and select the name of the folder you just created. This automatically takes you to the WordPress installation.
When asked for the database name use the name you used earlier in step 3.
Now finish the installation and you are done!
Finished developing your website?
Check out this article to get more information on how to move your local hosted WordPress site to a hosting account!