Title: Site URL / Database error
Last modified: August 22, 2016

---

# Site URL / Database error

 *  Resolved [anagalicia](https://wordpress.org/support/users/anagalicia/)
 * (@anagalicia)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/site-url-database-error/)
 * Hii,
 * I got an SSL Certificate for my website about a month ago, but I’m having some
   problems to get the url with the HTTPS instead of the HTTP, so today we tried
   by changing the site’s URL by adding the HTTPS instead of the HTTP, and it appeared
   to be working without a problem, but right now when I try to get into my website
   I get this error: Error establishing a database connection and if I try to access
   to my dashboard I get the same problem.
 * I tried to add this:
    define(‘WP_HOME’,’[http://www.riskmexico.com&#8217](http://www.riskmexico.com&#8217););
   define(‘WP_SITEURL’,’[http://www.riskmexico.com&#8217](http://www.riskmexico.com&#8217););
 * to my wp-config file and add this to the functions:
 * update_option(‘siteurl’,’[http://www.riskmexico.com&#8217](http://www.riskmexico.com&#8217););
   
   update_option(‘home’,’[http://www.riskmexico.com&#8217](http://www.riskmexico.com&#8217););
 * but nothing happened. I also tried with the relocate method but it didn’t work.
   What else can I do? Please HELP!

Viewing 6 replies - 1 through 6 (of 6 total)

 *  [ftschumann](https://wordpress.org/support/users/ftschumann/)
 * (@ftschumann)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/site-url-database-error/#post-5620380)
 * Try adding:
 * define( ‘FORCE_SSL_ADMIN’, true );
 * to your wp-config.php file.
 *  Thread Starter [anagalicia](https://wordpress.org/support/users/anagalicia/)
 * (@anagalicia)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/site-url-database-error/#post-5620392)
 * It’s not working 🙁
 *  [ftschumann](https://wordpress.org/support/users/ftschumann/)
 * (@ftschumann)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/site-url-database-error/#post-5620407)
 * Remove the additions that you made to your wp-config file – but don’t remove
   
   define(‘FORCE_SSL_ADMIN’, true)
 *  Thread Starter [anagalicia](https://wordpress.org/support/users/anagalicia/)
 * (@anagalicia)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/site-url-database-error/#post-5620413)
 * I tried that, and now it takes a long time to refresh and when it finally loads
   I get this:
 * 500: Internal server error
    This error is generated when a script running on 
   the server could not be implemented or permissions are incorrectly assigned for
   files or directories Troubleshooting suggestions: Temporarily disable any rewrite
   rules by renaming your .htaccess file if it exists. Ensure that any CGI or Perl
   scripts have at least .755. permissions. If trying to run PHP and you get this
   error, you may have an invalid php.ini in your /cgi-bin, or may be missing your
   php.dat file in this folder.
 * I tried to rename the .htaccess file to see if that was the issue but nothing
   happened and I don’t understand what the other two options mean..
 *  [ftschumann](https://wordpress.org/support/users/ftschumann/)
 * (@ftschumann)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/site-url-database-error/#post-5620416)
 * Ok, lets take a few steps back. Restore wp-config.php by removing the text you
   added and the remove the text I gave you.
 * That should then return everything to the state it was in after you changed the
   url to include https in the wordpress settings.
 * What message do you get?
 *  Thread Starter [anagalicia](https://wordpress.org/support/users/anagalicia/)
 * (@anagalicia)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/site-url-database-error/#post-5620419)
 * It’s working now!! Thank you so much! haha you saved me 🙂

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Site URL / Database error’ is closed to new replies.

## Tags

 * [Database Error](https://wordpress.org/support/topic-tag/database-error/)
 * [url](https://wordpress.org/support/topic-tag/url/)
 * [wp-config](https://wordpress.org/support/topic-tag/wp-config/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 6 replies
 * 2 participants
 * Last reply from: [anagalicia](https://wordpress.org/support/users/anagalicia/)
 * Last activity: [11 years, 5 months ago](https://wordpress.org/support/topic/site-url-database-error/#post-5620419)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
