I have to work with a friend in a wordpress project, and we want to be able to work everyone from our side in localhost.
For this we are using git to have the same code, but we need to use the same database.
I created one database online :
https://xxxx.xxxxxx.com/phpmyadmin
I edit my wp-conf file to have something like this :
define( 'DB_NAME', 'db_name' );
define( 'DB_USER', 'admin' );
define( 'DB_PASSWORD', '******' );
define( 'DB_HOST', 'https://xxxx.xxxxxx.com' );
I already tried with :
define( 'DB_HOST', 'xxxx.xxxxxx.com/phpmyadmin' );
or
define( 'DB_HOST', 'http://xxxx.xxxxxx.com' );
or
define( 'DB_HOST', 'http://xxxx.xxxxxx.com/phpmyadmin' );
etc…
Thanks,
Benjamin.
2
Answers
To resolve this : I just make the database public.
If you refer to the codex here https://codex.wordpress.org/Editing_wp-config.php for setting up your
DB_HOST
The format should be
or in some instances if you need to set a port.