How To'sMacOS

How to Setup Localhost Server on your Mac for WordPress ( Port Forwarding / PTCL Routers)

Today we are going to Setup our Own localhost Server on Mac OS X , I know it will be Posted Already on the Internet and we’ll be doing Port Forwarding on PTCL Router as well, So we can host that Localhost WordPress worldwide on the internet using Port Forwarding.

Why Hosting WordPress on Localhost?

If you’re a WordPress Developer or Beginner trying to learn new things on WordPress or wanted to Code your own Themes then it’s better to do with on your own Localhost WordPress website. OR you have a Project to Complete and you don’t have brought a Hosting yet and you wanted to show that website to your Client then this method will be useful for you to start with.

I hope you understand why we are doing this?

Things you Need?

Download MAMP Server for your Mac OS X ( Install it and Run it! )

After Install you’ll get a box like that in a Screenshot. If you wanted to do some additional Settings you need to Change stuff in Preferences If needed.

Now, Let me show you some settings!

How to Setup Localhost Server on your Mac ( Port Forwarding / PTCL Routers)

Change Ports if you need it! Else All-Good!

Now, Let’s Do Port Forwarding on PTCL Router to make our LocalHost Live After that We’ll be installing WordPress in Next Tutorial. But First, we have to Port Forward!

My PTCL Default Gateway is and admin/pass are: admin/admin That’s the most important Part!

If your Port Forwarding or you have Static IP Address you should Change your Default Gateway Username and Password. If you never change that and leave to default then anyone can log in to your router and change to whatever settings he wants and be able to setup DNS on your router and do some illegal stuff from your Static IP Address. You have to Protect that! Very Important.

I’ll show you how to change your Default Username and Password or Any Hacker can brute force or Dictionary attack on your Router.

Okay, let’s start!

If you go to  Normally it’s on 80 port but I’m not sure what is yours! Mine is on 80 Port HTTP.

Default Router Login is username: admin password: admin! Remember to change the default login to a strong password!

Now that’s how your Router Gateway looks! Completely based on C++ Programming.

Now for Port Forwarding move to Advanced Setup | NAT | [ Add Option ] Then you’ll see a window like that!

Fill this Detail

Custom Service: Any Name

Server IP Address: Your IPv4 *How to check yours? ( Goto CMD type: ipconfig and check | In Linux/Mac in terminal type: ifconfig/iwconfig )

After this in External Port Start and End Port will be the same which Port you wanted to Port Forward! So, here we are doing right now just for MAMP Server So our Default MAMP HTTP server is running on 8888 Port!

The protocol should be TCP and click apply and you’re Done!

Now, How to check your Port is Forwarded?


And Vola! Port Forward in PTCL, Your Localhost is on WAN! 🙂 In a Next tutorial, I’ll be setting up WordPress and Installing.

Related Articles

Back to top button