I use XAMPP to develop wordpress themes, and I want to use ManageWP to administer / clone the sites to the production server. I have followed every tutorial I can find on the matter, but can't manage to get external access to my localhost!
This related SE answer seems so straightforward!
I'm pretty sure I've got the last three steps right, (no firewall, ports 80 TCP&UDP > 80, server IP assigned by MAC address) but I don't know how to do the first (I've tried playing around in httpd.conf by setting the ServerName to my external IP address, but thats just a wild random fail :)
Whilst port forwarding is active I can see the website at: ##.###.64.188/mysite.dev (my external IP) whilst I'm on the local network, but if I connect via my 3g mobile connection i get:
Not Found
The requested URL http://<snip> was not found on this server
Apache Server at ##.###.64.188 Port 3128
which seems to indicate i'm somewhere in the right vicinity! but no idea where to go from here...
Any suggestions? TIA, Tim
Running:
Simple answer here: my ISP Optus blocks incoming connections on port 80. So, I've added:
listen 8080
to httpd.conf and adjusted my port forward correspondingly, and now i connect fine!
For those coming after, I've also setup http auth directives in my ~/Sites and /phpmyadmin entries in httpd.conf for somewhat increased security.
To get the WP site and links working, I'm setting the WP_SITEURL dynamically:
// wp-config.php
$host = $_SERVER['SERVER_NAME'];
if($host == 'subdomain.mysite.com')
$url = 'http://subdomain.mysite.com:8080';
else
$url = 'http://mysite.dev';
define('WP_HOME', $url);
define('WP_SITEURL', $url);
Then, in the virtualhost for the site I'm configuring, I've set <VirtualHost *:8080>
.. works a treat! mission accomplished.
(Edit: I no longer have XAMPP installed, and have forgotten its directory structure, but the virtual hosts are defined similarly to the apache2 default: extra/httpd-vhosts.conf, which is included towards the end of httpd.conf)
PS manageWP needs to be whitelisted to allow connections past the http basic auth.
Big thanks to Garth and River who answered my call on FB...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With