Title: Catchable fatal error&#8230; default-constants.php
Last modified: August 30, 2016

---

# Catchable fatal error… default-constants.php

 *  [babeuske](https://wordpress.org/support/users/babeuske/)
 * (@babeuske)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/please-help-catchable-fatal-error-default-constantsphp-1/)
 * I have been looking around but can’t find another one had similar error.
 * After upgrading my wordpress/plugins… (hard to remember). my website got this
   error message:
 * Catchable fatal error: Object of class WP_Error could not be converted to string
   in /home/content/41/7375441/html/atherethere/wp-includes/default-constants.php
   on line 101
 * and the line 101 is
 * function wp_plugin_directory_constants() {
    if ( !defined(‘WP_CONTENT_URL’) )**
   define( ‘WP_CONTENT_URL’, get_option(‘siteurl’) . ‘/wp-content’); // full url–
   WP_CONTENT_DIR is defined further up**
 * please help 🙁 feeling lost
    i tried deactivated the plugins from ftp … and also
   re-uploading the wordpress files other than the wp-content folder.. but nothing
   helped.

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

 *  [brunopbarbosa](https://wordpress.org/support/users/brunopbarbosa/)
 * (@brunopbarbosa)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/please-help-catchable-fatal-error-default-constantsphp-1/#post-6383597)
 * Hello, i’ve been having the same issue.
 * [http://themehybrid.com/board/topics/urgent-catchable-fatal-error-site-down](http://themehybrid.com/board/topics/urgent-catchable-fatal-error-site-down)
 * This thread here pointed me in the right direction, although i’m not sure if 
   the issue is definitely solved.
 *  [Astrolabe61](https://wordpress.org/support/users/astrolabe61/)
 * (@astrolabe61)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/please-help-catchable-fatal-error-default-constantsphp-1/#post-6383684)
 * I have the same issue (same error message, also line 101 in default-constants).
   The [website](http://www.elysiansingers.com) has been completely stable for 3
   years, but now this. It probably first happened on July 25th. I realised the 
   site was down late on the 28th and managed to recover it the following morning
   by switching to a backup copy of the database taken by the hosting service on
   the 25th. It stayed up for 24 hours, but then went down again. I switched to 
   a backup copy taken early on the 30th. This time the site stayed up for 36 hours
   before going down again, always with the same error message. The only thing about
   the site that has changed recently, as far as I know, is the WP update. Any bright
   ideas? Does the fact that it keeps tripping out at longish intervals provide 
   a clue?
 *  Thread Starter [babeuske](https://wordpress.org/support/users/babeuske/)
 * (@babeuske)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/please-help-catchable-fatal-error-default-constantsphp-1/#post-6383687)
 * I had to pay freelance on upwork to fix it .. Costed me $23
    I couldn’t find 
   a solution ;( Now the website is running fine
 *  [Astrolabe61](https://wordpress.org/support/users/astrolabe61/)
 * (@astrolabe61)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/please-help-catchable-fatal-error-default-constantsphp-1/#post-6383802)
 * Another crash this morning (same error message), presumably a reaction to the
   WP4.2.4 release on August 4th (my website takes updates automatically). I have
   now been able to establish that my problem is the one described in the thread
   mentioned by brunopbarbosa above, namely that the site URL is being reset to 
   O:8:”WP_Error”:2:{s:6:”errors”;a:1:{s:30:”wpdb_get_table_charset_failure”;a:1:{
   i:0;s:0:””;}}s:10:”error_data”;a:0:{}}. Hardly surprising the site is crashing
   if WP updates are doing that to it…
 *  [Astrolabe61](https://wordpress.org/support/users/astrolabe61/)
 * (@astrolabe61)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/please-help-catchable-fatal-error-default-constantsphp-1/#post-6383806)
 * Here’s a possible solution: the site developer has left two lines of code at 
   the top of the functions.php file in my themes folder that I suspect should have
   been [removed](https://codex.wordpress.org/Changing_The_Site_URL):
    update_option(‘
   siteurl’,’[http://www.elysiansingers.com&#8217](http://www.elysiansingers.com&#8217););
   update_option(‘home’,’[http://www.elysiansingers.com&#8217](http://www.elysiansingers.com&#8217););
   I will take them out and see what happens.
 *  [Astrolabe61](https://wordpress.org/support/users/astrolabe61/)
 * (@astrolabe61)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/please-help-catchable-fatal-error-default-constantsphp-1/#post-6383836)
 * The site has survived the upgrade to WordPress 4.3, so hopefully that was the
   answer.
 *  [ishfaq6680](https://wordpress.org/support/users/ishfaq6680/)
 * (@ishfaq6680)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/please-help-catchable-fatal-error-default-constantsphp-1/#post-6383910)
 * I was facing the same problem and then i got the solution by doing the below.
 * if you have migrated the site from one server to another and have edited the 
   config.php and functions.php files with the addition of these two lines.
 * define(‘WP_HOME’,’[http://example.com&#8217](http://example.com&#8217););
    define(‘
   WP_SITEURL’,’[http://example.com&#8217](http://example.com&#8217););
 * Remove the above lines from config.php and functions.php files.
 * Then go to wp-options table in your phpmyadmin from your cpanel account.
    You
   will find the error like this “O:8:”WP_Error”:2:{s:6:”errors”;a:1:{s:30:”wpdb_get_table_charset_failure”;
   a:1:{i:0;s:0:””;}}s:10:”error_data”;a:0:{}}”
 * Replace the whole thinng with the correct url like [http://www.example.com](http://www.example.com).
 * Save changes and you are done. Hope this helps you.
 * Thanks
 *  [Mimi](https://wordpress.org/support/users/immeemz/)
 * (@immeemz)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/please-help-catchable-fatal-error-default-constantsphp-1/#post-6383911)
 * > if you have migrated the site from one server to another and have edited the
   > config.php and functions.php files with the addition of these two lines.
   > define(‘WP_HOME’,’[http://example.com&#8217](http://example.com&#8217););
   >  
   > define(‘WP_SITEURL’,’[http://example.com&#8217](http://example.com&#8217););
   > Remove the above lines from config.php and functions.php files.
   > Then go to wp-options table in your phpmyadmin from your cpanel account.
   >  You
   > will find the error like this “O:8:”WP_Error”:2:{s:6:”errors”;a:1:{s:30:”wpdb_get_table_charset_failure”;
   > a:1:{i:0;s:0:””;}}s:10:”error_data”;a:0:{}}”
   > Replace the whole thinng with the correct url like [http://www.example.com](http://www.example.com).
   > Save changes and you are done. Hope this helps you.
 * This was EXACTLY the solution to the problem. Thank you ishfaq6680!
 *  [ishfaq6680](https://wordpress.org/support/users/ishfaq6680/)
 * (@ishfaq6680)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/please-help-catchable-fatal-error-default-constantsphp-1/#post-6383912)
 * [@mimi](https://wordpress.org/support/users/mimi/).
    I am glad that the solution
   helped you.
 *  [Borge](https://wordpress.org/support/users/joeborge0914/)
 * (@joeborge0914)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/please-help-catchable-fatal-error-default-constantsphp-1/#post-6383925)
 * Correct. Or easy way go to **phpmyadmin**
 * >wp_option > siteURL
 * edit it from
 * “O:8:”WP_Error”:2:{s:6:”errors”;a:1:{s:30:”wpdb_get_table_charset_failure”;a:
   1:{i:0;s:0:””;}}s:10:”error_data”;a:0:{}}”
 * into
 * **[http://www.yourdomain.com](http://www.yourdomain.com)**
 *  [crtbretagne](https://wordpress.org/support/users/crtbretagne/)
 * (@crtbretagne)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/please-help-catchable-fatal-error-default-constantsphp-1/#post-6383926)
 * Hello,
 * I encounter the same problem.
    Do you know the origin of the modification of 
   the database wp_option > siteURL as “O:8:”WP_Error”:2:{s:6:”errors”;a:1:{s:30:”
   wpdb_get_table_charset_failure”;a:1:{i:0;s:0:””;}}s:10:”error_data”;a:0:{}}” ?
 * this is caused by:
    theme ? plugin ? or other reasons ?
 * thanks
 *  [Hamza](https://wordpress.org/support/users/krakmhmax/)
 * (@krakmhmax)
 * [10 years ago](https://wordpress.org/support/topic/please-help-catchable-fatal-error-default-constantsphp-1/#post-6383928)
 * My problem is “Catchable fatal error: Object of class WP_Error could not be converted
   to string in /home/max/public_html/wp-includes/default-constants.php on line 
   248
    “, can you please give me solution.

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

The topic ‘Catchable fatal error… default-constants.php’ is closed to new replies.

## Tags

 * [Catchable](https://wordpress.org/support/topic-tag/catchable/)
 * [config](https://wordpress.org/support/topic-tag/config/)
 * [fatal+error](https://wordpress.org/support/topic-tag/fatalerror/)
 * [php](https://wordpress.org/support/topic-tag/php/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 12 replies
 * 8 participants
 * Last reply from: [Hamza](https://wordpress.org/support/users/krakmhmax/)
 * Last activity: [10 years ago](https://wordpress.org/support/topic/please-help-catchable-fatal-error-default-constantsphp-1/#post-6383928)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
