I need help with my WP installation.
I have a home server for tests with LAMP and WP. I have created three sites: main.lan
, test2.lan
and pbtest.lan
.
pbtest.lan
was installed first, this is a multisite installation with subfolders. It worked perfect. Then I have added two new sites. I have access from another PC, so I have created necessary entries in hosts files on PC and server to have access with domain name. And at this moment problem occured.
Two new sites are working properly, when I put main.lan
in the browser I have main.lan
site opened. The same with test2.lan
. But when I try to open pbtest.lan
I see main.lan
site. In address bar there is IP address of my server instead of domain name. For main.lan
and test2.lan
there is domain name in the bar. When I disable two new sites and pbtest.lan
is the only one avaliable site it is opened properly.
This is part of wp-config.php
file for pbtest.lan
site:
/*Multisite*/
define('WP_ALLOW_MULTISITE', true);
define('MULTISITE', true);
define('SUBDOMAIN_INSTALL', false);
define('DOMAIN_CURRENT_SITE', '192.168.1.110');
define('PATH_CURRENT_SITE', '/');
define('SITE_ID_CURRENT_SITE', 1);
define('BLOG_ID_CURRENT_SITE', 1);
/* That's all, stop editing! Happy blogging. */
/** Absolute path to the WordPress directory. */
if ( !defined('ABSPATH') )
define('ABSPATH', dirname(__FILE__) . '/');
define('DOMAIN_CURRENT_SITE', '192.168.1.110');
I think this line redirects traffic to IP address, and first avaliable site is opened. In my case this is main.lan. When I replaced IP address with domain name pbtest.lan I get error conection with database.
I tried put the full path to the directory, but it didn't worked.
Help, what shell I change to have all sites work?
Thank you
English is not my native language, but I hope you will understand my problem :)
pbtest.lan
has its ownwp-config.php
is it not a separate install? Are all these sites on the same WP install in a multisite install? Or is each one an independent install of WP as a multisite? It isn't clear from your question. Also, I'm assuming that you're using Apache as you speak of VirtualHosts? Have you confirmed every domain serves the correct folder regardless of what WP does?