Scenario:
You're developing a PHP application on a Windows desktop using XAMPP. You want to work on the same project from a MacOS machine on your home network without installing XAMPP or any dependencies on the Mac.
What We'll Accomplish:
This guide covers two main tasks:
- Giving your Mac access to the project folder on Windows
- Giving your Mac access to phpMyAdmin running on Windows
Part 1: Enable File Sharing (Mac Access to Project Folder)
Step 1: Locate Your Project Folder
Ensure your project is in the XAMPP htdocs folder.
- Example path:
C:\xampp\htdocs\project
Step 2: Share the Folder on Windows
- Right-click the project folder and select Properties
- Go to the Sharing tab
- Click Advanced Sharing
- Check "Share this folder"
- Click Permissions and grant Full Control to ensure the Mac can read and write files
Step 3: Connect from Mac
- On your Mac, press Cmd + K
- Enter the Windows machine's IP address in this format:
smb://[IP_ADDRESS]- Find the Windows IP by opening Command Prompt and typing
ipconfig
- Find the Windows IP by opening Command Prompt and typing
- When prompted, enter your Windows username and password
- Find your username by typing
whoamiin Command Prompt - Important: Your Windows account must have a password. If it doesn't, go to Windows Settings → Accounts and set one
- Find your username by typing
Step 4: Open the Project on Mac
- Open VS Code (or your preferred text editor)
- The shared Windows folder will appear in Finder's sidebar under "Network" or "Locations"
- Open the project from this shared location
Part 2: Enable Database Access (Mac Access to phpMyAdmin)
Now that your Mac can edit files, you also need database access to make changes and view data. This requires configuring the Windows Firewall.
Step 1: Start XAMPP Services
- Open XAMPP as Administrator
- Start Apache and MySQL services
Step 2: Configure Windows Defender Firewall
- Type "Windows Defender Firewall" in the Windows search bar
- Click "Allow an app or feature through Windows Defender Firewall" in the left sidebar
Step 3: Allow Apache Through Firewall
- Click "Change settings"
- Find Apache HTTP Server and Apache HTTPS Server in the list
- Check both boxes, but only enable "Private" (since you're on a home network)
Step 4: Configure Inbound Rules
- Return to the Windows Defender Firewall main page
- Click "Advanced settings" in the left sidebar
- Select "Inbound Rules"
Step 5: Enable Required Ports
Ensure ports 80 (HTTP) and 443 (HTTPS) are:
- Enabled
- Set to allow connections from all remote hosts
Step 6: Find Your Windows IP Address
Open Command Prompt and type ipconfig. Note down the IPv4 address.
Step 7: Access phpMyAdmin from Mac
- Open a browser on your Mac
- Enter:
http://[WINDOWS_IP_ADDRESS]/phpmyadmin- Example:
http://192.168.1.100/phpmyadmin
- Example:
Testing Your Setup
To verify everything works:
- Open a browser on your Mac
- Navigate to:
http://[WINDOWS_IP_ADDRESS]/project - Your project should load and run from the Windows XAMPP server
- Any changes you make to files on the Mac will immediately reflect in the original Windows folder
You're all set! You can now develop seamlessly across both machines without duplicating your development environment.
Top comments (0)