Reputation: 33
Am trying to build a test environment for a WordPress project using xamp.
Apache is listening on localhost:8080 MySQL is 3306 root with no password
Changes did in wp-config Dbname is wp-db Dbhost is locallhost:8080 Dbuser is root
WordPress root folder is in c:/xamp/htdocs/wordpress
Before changing the dbhost from local host to localhost:8080 I was getting a "error establishing connection to database" now am jus getting a full white screen.
Please advise. A million thanks in advance.
Upvotes: 0
Views: 2270
Reputation: 7611
You may have introduced a PHP syntax error when you were changing your wp-config.php
- check the xampp PHP logs (edit see @markratledge's answer for more details on tracking down the error). After that, you were closer to the right setup when you saw the "error establishing connection to database" message, so in wp-config.php
localhost
(no port, as it seemed to work before)wpdbuser
password
(choose something more secure if the database is accessible externally)If you haven't already, create your empty database by running the following in MySQL (WordPress won't create the database for you, you need to do that):
CREATE DATABASE `wp-db` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
Also in MySQL, create the user with the details you specified in wp-config.php
:
create user 'wpdbuser'@'localhost' identified by 'password';
Finally, make sure your dedicated database user can create the WordPress tables:
grant all privileges on wp-db.* to wpdbuser@localhost;
Upvotes: 0
Reputation: 17561
White screens are usually PHP errors. Try Debug and see what PHP errors you are getting. You may simply have an error in wp-config.php or are missing a core WordPress file or folder.
Add
define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
in wp-config.php and the debug.log file will be in wp-content.
Add this line
define( 'WP_DEBUG_DISPLAY', true);
to wp-config.php to log and dump them to the browser.
See https://codex.wordpress.org/WP_DEBUG
Upvotes: 1