Help pointing non-www site to www - getting "error establishing a database connection"
Hi,
I'm trying to redirect my Wordpress site to point from non-www to www. That is, http://bharari.net should point to http://www.bharari.net.
I tried to do this 2 different ways. Using the 301 redirection method, I modified .htaccess to point non-www to www. When I do this I get a redirect loop error.
So I tried another way. In cPanel, I made the following updates in wp-config.php (added "www" after http://):
define('WP_HOME','http://www.bharari.net');
define('WP_SITEURL','http://www.bharari.net');
I also went to MyPhpAdmin and updated the siteurl value of wp_options table for the database to include "www".
After I do all this, I get an "Error establishing a database connection" when I visit my web site.
what am I doing wrong? I've undone the changes for now.
Many thanks!
I'm trying to redirect my Wordpress site to point from non-www to www. That is, http://bharari.net should point to http://www.bharari.net.
I tried to do this 2 different ways. Using the 301 redirection method, I modified .htaccess to point non-www to www. When I do this I get a redirect loop error.
So I tried another way. In cPanel, I made the following updates in wp-config.php (added "www" after http://):
define('WP_HOME','http://www.bharari.net');
define('WP_SITEURL','http://www.bharari.net');
I also went to MyPhpAdmin and updated the siteurl value of wp_options table for the database to include "www".
After I do all this, I get an "Error establishing a database connection" when I visit my web site.
what am I doing wrong? I've undone the changes for now.
Many thanks!