How to install WordPress locally on a mac without MAMP

How to install WordPress locally on a mac without MAMP

By the end of this article, you will able to install WordPress locally on a mac without MAMP.

What is MAMP?

MAMP – stands for “Mac OS X, Apache, MySQL, and PHP.” MAMP is a software package that is a combination of different software like Apache, MySQL & PHP

To start with, let me tell you that it’s been a while that Apple is shipping MacBook Pro with Apache installed on it by default.

So, you don’t have to worry about any server to install locally on your MacBook Pro in order to setup any website.

You will just have to install MySQL to start building websites.

To set up Apache, MySQL & PHP on your MacBook Pro, this is the best resource on the internet I have come across and this article keeps getting updated for every new release Mac comes up with.

macOS 11.0 Big Sur Web Development Environment

This article covers following steps –

1. Download Latest WordPress

How to install WordPress locally on a mac without MAMP
WordPress Download

Get a latest WordPress here

2. Copy it to Document Root of Apache Server – Where is apache document root on Mac?

Default Document root for Apache is /usr/local/var/www, if you want to keep the document root path the same then simply copy the downloaded WordPress zip to /usr/local/var/www folder.

If you want to change the document root to some other folder like /Users/your_user/Sites ( most of the times it is recommended to have all the your web development projects in this folder)

How to install WordPress locally on a mac without MAMP
Document Root of Apache Server

So, you can change it here – /usr/local/etc/httpd/httpd.conf.

In my case – DocumentRoot “/Users/rohu/Sites”, I have created a folder with the name my-life. So I have copied it to /Users/rohu/Sites/my-life/ folder.

I unzipped the downloaded WordPress folder and named the folder as wordpress-5.7. Therefore my wordpress is located at /Users/rohu/Sites/my-life/wordpress-5.7

3. Add Virtual Host – how to create a virtual host in mac Big Sur OSX?

To add virtual host for WordPress, this is the file you edit – in /usr/local/etc/httpd/extra/httpd-vhosts.conf file

<VirtualHost 0.0.0.0:80>
    DocumentRoot "/Users/rohu/Sites/my-life/wordpress-5.7"
    ServerName wordpress57.test
    <Directory /Users/rohu/Sites/my-life/wordpress-5.7>
        Options Indexes FollowSymLinks
        AllowOverride All
        Require all granted
    </Directory>
</VirtualHost>

Add Host entry in – /private/etc/hosts file

127.0.0.1 wordpress57.test

4. Restart Apache Server – How to restart Apache server on Mac Big Sur OSX

Once the virtual host entry is updated, don’t forget to restart apache server with following command

sudo apachectl start

5. Create a Database for WordPress

Go to your phpmyadmin and create DB with name of your choice, in my case – wordpress57

How to install phpmyadmin on Mac Big Sur OSX

How to install WordPress locally on a mac without MAMP
WP Database Default Tables

6. Run the virtual host domain in the browser

Once the virtual host entry and DB are created, the final step is to type in the newly created virtual host domain in the browser and hit enter. You will get the following screen

Step 1 – Select Primary Language of the Site

How to install WordPress locally on a mac without MAMP
WP install 1

Step 2 – Check the List of items you need to further continue with the installation.

  1. Database name – Database to store WordPress data
  2. Database username – username of Database to connect your WP site with your DB
  3. Database Password – password of Database to connect your WP site with your DB
  4. Database host – mostly it is localhost – so no need to change anything here
  5. Table prefix – This is just to have some unique DB table names for your website. If WP did not have this provision then every WordPress Database on the internet would have the same table names which is not a great idea.
How to install WordPress locally on a mac without MAMP
WP install 2

Step 3 – Fill the correct values in the DB connection details form

How to install WordPress locally on a mac without MAMP
WP install 3

Step 4 – In this step WordPress will tell you that everything you entered in step 3 is all good and now WP is ready to get installed on your MacBook Pro.

How to install WordPress locally on a mac without MAMP
WP install 4

Step 5 – At this step, WP is installed but it needs some essential information like Site title and a user account with an email to create an admin account to access the WP backend.

How to install WordPress locally on a mac without MAMP
WP install 5

Step 6 – Finally WordPress is installed and you are all set to go…

How to install WordPress locally on a mac without MAMP
WP install 6

I have a full-fledged video on my Youtube Channel which will guide you on how you can install WordPress locally on your MacBook Pro.

WordPress Admin Dashboard Panel

How to install WordPress locally on a mac without MAMP
WP Admin Dashboard

WordPress 5.7 default HomePage

How to install WordPress locally on a mac without MAMP
WP Site Default HomePage

Conclusion –

MAMP is just a tool that lets you install the software and tools required for building any website or web application whereas WordPress is a Content Management System CMS which is one of the Web development frameworks which can be used to build a website. It is always better to have your web development environment setup done using a command-line interface.

FAQs

does WordPress work on mac?

WordPress is a CMS content management system that can be used to built websites, blogs, or even app. Therefore, WordPress is not a Software that can be installed on Mac or any machine, it is basically a set of files and folder with .php extension which has some code written in PHP language, which to execute requires a server like Apache or Nginx and you can see WordPress in action on any browser. So WordPress is not Operating System dependent. Hence WordPress can work on any OS be it Mac, Windows, Linux, or any other OS, as it only requires a server.

About the author

Rohan Kamble

A Web Developer by profession, who loves the web to the core with over 9 Years of Experience working on a wide range of domains like websites on e-commerce, Travel, Alumni, matrimonial, company's professional sites, Finance, company internal communications and many more. Also WordPress Plugins & Chrome extensions.

View all posts

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.