Page 1 of 1

I can connect remotely to Xampp page and static but not wp

PostPosted: 24. August 2015 20:29
by luctroo
Hello,

My problem is connecting to my wordpress multisite from remote

I can successfully connect remotely to default Xampp page, and other static sites (folders) located inside htdocs.

What do I need to do to be able to connect to database driven website, remotely in the same way?



I am running Win 10.
64 bit
xampp installed on
P:\xampp

My wp-config.php file
--------------------------------
define('DB_NAME', 'cfm');

/** MySQL database username */
define('DB_USER', 'root');

/** MySQL database password */
define('DB_PASSWORD', 'password');

/** MySQL hostname */
define('DB_HOST', 'localhost');

/** Database Charset to use in creating database tables. */
define('DB_CHARSET', 'utf8mb4');

/** The Database Collate type. Don't change this if in doubt. */
define('DB_COLLATE', '');

------------------------------

/* Multisite */
//define( 'WP_ALLOW_MULTISITE', true );
define('MULTISITE', true);
define('SUBDOMAIN_INSTALL', false);
define('DOMAIN_CURRENT_SITE', 'localhost');
define('PATH_CURRENT_SITE', '/cfm');
define('SITE_ID_CURRENT_SITE', 1);
define('BLOG_ID_CURRENT_SITE', 1);

Thank you for your help.

Re: I can connect remotely to Xampp page and static but not

PostPosted: 24. August 2015 20:30
by Altrea
luctroo wrote:define('DOMAIN_CURRENT_SITE', 'localhost');

What do you think does localhost mean from remote?

Re: I can connect remotely to Xampp page and static but not

PostPosted: 24. August 2015 20:34
by luctroo
ok. How do I fix this?
Can I have the site be both accessible locally and remotely at the same time?
I mean, If I change to something like my dyndns.com or my external ip, then my local site won't work, correct?

How do people deal with this?

Thank you.

Re: I can connect remotely to Xampp page and static but not

PostPosted: 24. August 2015 20:38
by Nobbie
luctroo wrote:Can I have the site be both accessible locally and remotely at the same time?


Yes.

luctroo wrote:I mean, If I change to something like my dyndns.com or my external ip, then my local site won't work, correct?


No, It works anyway. But if you wanna have different DocumentRoots for localhost and the dyndns.com Domain, you need to configure VirtualHosts. See Apache Doc how to do.

Re: I can connect remotely to Xampp page and static but not

PostPosted: 24. August 2015 21:27
by luctroo
Ok.
I'm really confused.

I want to basically fix the reason why I can't connect to database remotely.

I'm using a dyndns address to connect like this. cfm.dyndns.com:8080/cfm

Am I suppose to use define('DB_HOST', 'cfm.dlinkddns.com:3306'); ?

Re: I can connect remotely to Xampp page and static but not

PostPosted: 24. August 2015 21:34
by Altrea
No, the database connect is independend of the HTTP request.
The DB_Host must be set dependend of the location the php script which tries to connect is saved.
So if the PHP script is at the same host as the database, than localhost is correct here.

Re: I can connect remotely to Xampp page and static but not

PostPosted: 24. August 2015 21:56
by luctroo
Hello Altrea,

I think you may have misunderstood me in my first message.

Then why can't I connect to database then?

Re: I can connect remotely to Xampp page and static but not

PostPosted: 24. August 2015 22:09
by Altrea
Then your first thread about accessing a database driven webapplication from a remote computer is absolutely misleading.

How do you try to connect to the database? And in which way is wordpress involved?
Where are your wordpress files and where is the database?