Testing localhost WordPress site over LAN with iPad, iPhone

1 down vote favorite I am developing a Wordpress theme that requires testing with multiple devices over my local network. I use the localhost server XAMPP which runs apache on port 80.

When I access my PC's IP (192.168.0.16) port 80 using an iPad, it returns the apache directory of which I have two sites:

site1 wordpress The first site is a basic php site, this loads perfectly. The second site is Wordpress, and won't let me access it (see pic).

I have tried changing the setting inside Wordpress:

changing localhost to 192.168.0.16 inside the site and Wordpress address. Can anyone advise me on what I'm doing wrong?

Topic localhost xampp testing theme-development Wordpress

Category Web


Go to Admin Panel > Settings > General and replace localhost with your ip-address for WordPress Address (URL) and Site Address (URL).

Or go to wp-config.php and add

define('WP_HOME','http://192.168.0.16');
define('WP_SITEURL','http://192.168.0.16');

And when you access to from other device you should go 192.168.0.16/directoryOfWordpress

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.