Hosting a WordPress Application on Local Server
This blog is written in response to a query from a fellow blogger. Who wanted to know how do I manage and maintain my personal blog. I have been blogging and using blogger.com to host my blog site for almost a decade now. My blogs are my personal notes or curation of materials that I use. His question provoked me to think about hosting my own website on my spare MacBook pro.
With that in mind, I started some research activities. This blog is my steps of activities and the final result.
Technology Stack Selection
I metaphorically selected LAMP (OS-Linux WebServer-Apache Database -MySQL Programing Language -PHP) as the underlying technology. There is a well-written article that will explain why I did so. which technology is right for my website
I first started with something simple and easy to implement. In order to do so, I used MAMP. Here is the blog by Laurence Bradford that I used as a guide. HOW TO INSTALL WORDPRESS ON YOUR MAC
Once I understood the basic setup. I wanted to use the more advanced option where I will have the flexibility to update any of the components. In order to do so, I followed the blog by Andy Miller. macOS 11.0 Big Sur Apache Setup: Multiple PHP Versions
Installing Apache Httpd Server
sudo apachectl stop
sudo launchctl unload -w /System/Library/LaunchDaemons/org.apache.httpd.plist 2>/dev/null
Now we need to install the new version provided by Brew:
brew install httpd
Without options, httpd won’t need to be built from source, so it installs pretty quickly. Upon completion you should see a message like:
? /usr/local/Cellar/httpd/2.4.46: 1,658 files, 27.9MB
Now we just need to configure things so that our new Apache server is auto-started
brew services start httpd
You now have installed Homebrew’s Apache, and configured it to auto-start with a privileged account. It should already be running, so you can try to reach your server in a browser by pointing it at http://localhost:8080, you should see a simple header that says “It works!”.
Once the local server is up and running. All I needed to do is make my server accessible over the internet.
Kinshuk Dutta
New York