Question

Wordpress isnt loaded after changing MySQL password?

Hi everyone,

I just changed mysql password of db user (in wp-config file) I tried with both ways: admin tool, sql command with PASSWORD(‘mypassword’) then after that my wp doesnt work anymore. It said as the following quote So what is the problem and how can i fix it? Thank you.

<?php
/**
 * Front to the WordPress application. This file doesn't do anything, but loads
 * wp-blog-header.php which does and tells WordPress to load the theme.
 *
 * @package WordPress
 */

/**
 * Tells WordPress to load the WordPress theme and output it.
 *
 * @var bool
 */
define('WP_USE_THEMES', true);

/** Loads the WordPress Environment and Template */
require( dirname( __FILE__ ) . '/wp-blog-header.php' );
Subscribe
Share

yah, you might be right. I installed mod_security and it might change the config file php module is still ok but PHP is not executing. Cant find the root cause now… Im using Apache!

This is unlikely to have been caused by changing the database password. When WordPress can not connect to the database, it simply shows:

Error establishing a database connection

This seems to be your webserver not executing PHP. Did you happen to make any changes elsewhere at the same time? Are you using Apache? Nginx?


Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Hello,

Usually this would happen with Apache and PHP when there is no PHP handler installed.

For example, you could use the libapache2-mod-php package for that:

apt install libapache2-mod-php

For more information, you can follow the steps here:

https://www.digitalocean.com/community/tutorials/how-to-install-linux-apache-mysql-php-lamp-stack-ubuntu-18-04#step-3-installing-php

Best,

Bobby

This comment has been deleted