Title: Fatal error: Uncaught Error: Undefined class constant &#8216;BUFFER_SIZE&#8217;
Last modified: May 9, 2019

---

# Fatal error: Uncaught Error: Undefined class constant ‘BUFFER_SIZE’

 *  Resolved [martinxun03](https://wordpress.org/support/users/martinxun03/)
 * (@martinxun03)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/fatal-error-uncaught-error-undefined-class-constant-buffer_size/)
 * hello,
    just upgraded to v5.2,but i got this fatal error:
 * Fatal error: Uncaught Error: Undefined class constant ‘BUFFER_SIZE’ in /public/
   wp-includes/Requests/Transport/cURL.php:391 Stack trace: #0 /public/wp-includes/
   Requests/Transport/cURL.php(133): Requests_Transport_cURL->setup_handle(‘[https://api.wor…&#8217](https://api.wor…&#8217);,
   Array, ‘plugins=%7B%22p…’, Array) #1 /public/wp-includes/class-requests.php(379):
   Requests_Transport_cURL->request(‘[https://api.wor…&#8217](https://api.wor…&#8217);,
   Array, Array, Array) #2 /public/wp-includes/class-http.php(384): Requests::request(‘
   [https://api.wor…&#8217](https://api.wor…&#8217);, Array, Array, ‘POST’, Array)#
   3 /public/wp-includes/class-http.php(596): WP_Http->request(‘[https://api.wor…&#8217](https://api.wor…&#8217);,
   Array) #4 /public/wp-includes/http.php(187): WP_Http->post(‘[https://api.wor…&#8217](https://api.wor…&#8217);,
   Array) #5 /public/wp-includes/update.php(376): wp_remote_post(‘[https://api.wor…&#8217](https://api.wor…&#8217);,
   Arra in /public/wp-includes/Requests/Transport/cURL.php on line 391
    The site
   is experiencing technical difficulties. Please check your site admin email inbox
   for instructions.
 * The last two sentences above are also displayed almost every page of the WP backend.
   sometimes can’t open, plugings can’t updated,or wp-admin can’t login, etc.but
   there is NO mail sent to my admin email box.
 * The line 391 is as follows, seems to be the same as the one in github/wordpress
   
   curl_setopt($this->handle, CURLOPT_BUFFERSIZE, Requests::BUFFER_SIZE);
 * Any ideas? thanks!
    -  This topic was modified 7 years, 1 month ago by [martinxun03](https://wordpress.org/support/users/martinxun03/).
    -  This topic was modified 7 years, 1 month ago by [martinxun03](https://wordpress.org/support/users/martinxun03/).
    -  This topic was modified 7 years, 1 month ago by [martinxun03](https://wordpress.org/support/users/martinxun03/).

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

 *  Moderator [James Huff](https://wordpress.org/support/users/macmanx/)
 * (@macmanx)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/fatal-error-uncaught-error-undefined-class-constant-buffer_size/#post-11514529)
 * Try [manually resetting your plugins](https://wordpress.org/support/article/faq-troubleshooting/#how-to-deactivate-all-plugins-when-not-able-to-access-the-administrative-menus)(
   no Dashboard access required). If that resolves the issue, reactivate each one
   individually until you find the cause.
 * If that does not resolve the issue, access your server via [SFTP or FTP](https://wordpress.org/support/article/ftp-clients/),
   or a file manager in your hosting account’s control panel (consult your hosting
   provider’s documentation for specifics on these), navigate to /wp-content/themes/
   and rename the directory of your currently active theme. This will force the 
   default theme to activate and hopefully rule-out a theme-specific issue (theme
   functions can interfere like plugins).
 *  [Joy](https://wordpress.org/support/users/joyously/)
 * (@joyously)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/fatal-error-uncaught-error-undefined-class-constant-buffer_size/#post-11514647)
 * Did you check your spam folder for the email? It should be there somewhere. The
   email has a link to enter recovery mode. But it all about disabling the plugin
   with the problem. Your error looks like it was attempting to use the WordPress
   API to update something. Is your server a 32bit machine?
 *  [autotutorial](https://wordpress.org/support/users/autotutorial/)
 * (@autotutorial)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/fatal-error-uncaught-error-undefined-class-constant-buffer_size/#post-11514684)
 * [https://wordpress.org/about/requirements/](https://wordpress.org/about/requirements/)
   
   Use php 5.6.20+?
 *  Moderator [James Huff](https://wordpress.org/support/users/macmanx/)
 * (@macmanx)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/fatal-error-uncaught-error-undefined-class-constant-buffer_size/#post-11514711)
 * It wouldn’t have allowed the update if they weren’t already on PHP 5.6.20 or 
   higher.
 *  Thread Starter [martinxun03](https://wordpress.org/support/users/martinxun03/)
 * (@martinxun03)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/fatal-error-uncaught-error-undefined-class-constant-buffer_size/#post-11518239)
 * [@autotutorial](https://wordpress.org/support/users/autotutorial/) it’s on php
   7.2, thanks. my host can’t upgrade to 7.3 right now.
 *  [autotutorial](https://wordpress.org/support/users/autotutorial/)
 * (@autotutorial)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/fatal-error-uncaught-error-undefined-class-constant-buffer_size/#post-11518250)
 * read all about this guide.
    [https://wordpress.org/support/topic/read-this-first-wordpress-5-2-master-list/](https://wordpress.org/support/topic/read-this-first-wordpress-5-2-master-list/)
 *  Thread Starter [martinxun03](https://wordpress.org/support/users/martinxun03/)
 * (@martinxun03)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/fatal-error-uncaught-error-undefined-class-constant-buffer_size/#post-11518258)
 * [@joyously](https://wordpress.org/support/users/joyously/) no email sent to my
   gmail inbox, not even in the spam folder. i tried to rename the plugin folder,
   problem still remain. i don’t know what plugin might cause the problem, but i
   will try again to dig deeper. the WordPress site is on a Ubuntu 14.04LTS X64 
   system with mysql & nginx. Thank you for your advice.
 *  Thread Starter [martinxun03](https://wordpress.org/support/users/martinxun03/)
 * (@martinxun03)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/fatal-error-uncaught-error-undefined-class-constant-buffer_size/#post-11518262)
 * [@macmanx](https://wordpress.org/support/users/macmanx/) thank you and i will
   do that. and report back.
 *  Thread Starter [martinxun03](https://wordpress.org/support/users/martinxun03/)
 * (@martinxun03)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/fatal-error-uncaught-error-undefined-class-constant-buffer_size/#post-11518290)
 * [@autotutorial](https://wordpress.org/support/users/autotutorial/) thank you 
   im reading now. 🙂 sorry it’s my first time to be here.
 *  [autotutorial](https://wordpress.org/support/users/autotutorial/)
 * (@autotutorial)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/fatal-error-uncaught-error-undefined-class-constant-buffer_size/#post-11520504)
 * as you can see the constant is defined here [https://github.com/WordPress/WordPress/blob/master/wp-includes/class-requests.php](https://github.com/WordPress/WordPress/blob/master/wp-includes/class-requests.php)
   I hope you have read the guide on wordpress 5.2 and have tried the manual upgrade
   as proposes the guide. update us on what happens.
 *  Thread Starter [martinxun03](https://wordpress.org/support/users/martinxun03/)
 * (@martinxun03)
 * [7 years ago](https://wordpress.org/support/topic/fatal-error-uncaught-error-undefined-class-constant-buffer_size/#post-11533399)
 * thanks [@autotutorial](https://wordpress.org/support/users/autotutorial/) [@macmanx](https://wordpress.org/support/users/macmanx/)
   [@joyously](https://wordpress.org/support/users/joyously/) today i login to the
   dashboard and everything back to normal, so i did all plugin upgrades and virus
   scan, all work fine, no problem. it’s a bit strange but glad problem solved.

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

The topic ‘Fatal error: Uncaught Error: Undefined class constant ‘BUFFER_SIZE’’ 
is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 11 replies
 * 4 participants
 * Last reply from: [martinxun03](https://wordpress.org/support/users/martinxun03/)
 * Last activity: [7 years ago](https://wordpress.org/support/topic/fatal-error-uncaught-error-undefined-class-constant-buffer_size/#post-11533399)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
