Title: Fatal Error: Call to undefined function get_shortcode_regex()
Last modified: August 19, 2016

---

# Fatal Error: Call to undefined function get_shortcode_regex()

 *  Resolved [xzyber](https://wordpress.org/support/users/xzyber/)
 * (@xzyber)
 * [18 years, 1 month ago](https://wordpress.org/support/topic/fatal-error-call-to-undefined-function-get_shortcode_regex/)
 * Hey guys I just got done with the upgrade…now when I click on my pages I get 
   the following error:
 * > Fatal error: Call to undefined function: get_shortcode_regex() in …/wp-includes/
   > formatting.php on line 95
 * I looked at the code on line 95…
 * > Line 95: $pee = preg_replace(‘/<p>\s*?(‘ . get_shortcode_regex() . ‘)\s*<\/
   > p>/s’, ‘$1’, $pee); // don’t auto-p wrap shortcodes that stand alone
 * I researched it…found only one solution: Someone said they just deleted line 
   95…
 * But what part of it? All of it? Will deleting this line cause any problems…line
   95 must be there for some reason or another…WHAT TO DO!?!?! (sorry had to vent,
   have had one prob after another after this upgrade!)
 * Please help! Thanks!

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

 *  [WizzKid](https://wordpress.org/support/users/wizzkid/)
 * (@wizzkid)
 * [18 years, 1 month ago](https://wordpress.org/support/topic/fatal-error-call-to-undefined-function-get_shortcode_regex/#post-749630)
 * I am getting the exact same problem, please help wordpress team!
 *  [moshu](https://wordpress.org/support/users/moshu/)
 * (@moshu)
 * [18 years, 1 month ago](https://wordpress.org/support/topic/fatal-error-call-to-undefined-function-get_shortcode_regex/#post-749642)
 * Make sure the file _wp-includes/shortcodes.php_ is uploaded and it’s not demaged.
 *  [WizzKid](https://wordpress.org/support/users/wizzkid/)
 * (@wizzkid)
 * [18 years, 1 month ago](https://wordpress.org/support/topic/fatal-error-call-to-undefined-function-get_shortcode_regex/#post-749646)
 * Thanks, I just reverted back to 2.5 and installed the plugin wp-auto-update and
   did it from there, works fine now!
 *  Thread Starter [xzyber](https://wordpress.org/support/users/xzyber/)
 * (@xzyber)
 * [18 years, 1 month ago](https://wordpress.org/support/topic/fatal-error-call-to-undefined-function-get_shortcode_regex/#post-749663)
 * Hey guys! Fixed!
 * [http://wordpress.org/extend/plugins/wordpress-automatic-upgrade/](http://wordpress.org/extend/plugins/wordpress-automatic-upgrade/)
 * Use the wp-automatic-upgrade plugin to re-install! Awesome plugin, alot quicker
   too!
 * Thanks again!
 * -Brian
 *  [dohoon](https://wordpress.org/support/users/dohoon/)
 * (@dohoon)
 * [18 years, 1 month ago](https://wordpress.org/support/topic/fatal-error-call-to-undefined-function-get_shortcode_regex/#post-749710)
 * i was having the exact same problem and fixed it by just copying all the *.php
   files in /wordpress folder NOT the folders, just the files.
 *  [nomoregrapes](https://wordpress.org/support/users/nomoregrapes/)
 * (@nomoregrapes)
 * [18 years, 1 month ago](https://wordpress.org/support/topic/fatal-error-call-to-undefined-function-get_shortcode_regex/#post-749781)
 * Well now upgrade.php isn’t showing anything and I can’t get to wp-admin.
    I hope
   this goes better on my other blogs.
 *  [pavy](https://wordpress.org/support/users/pavy/)
 * (@pavy)
 * [18 years, 1 month ago](https://wordpress.org/support/topic/fatal-error-call-to-undefined-function-get_shortcode_regex/#post-750068)
 * Hey guys,
 * I had the same exact error and I fixed it simply by re-uploading the shortcodes.
   php (located in the wp-includes). The error went right away.
 *  [zajanatural](https://wordpress.org/support/users/zajanatural/)
 * (@zajanatural)
 * [18 years ago](https://wordpress.org/support/topic/fatal-error-call-to-undefined-function-get_shortcode_regex/#post-750086)
 * The only thing that worked for me was to revert to 2.5, download the automatic
   upgrade plugin. Now the line 95 code is gone and everything is back in order.
 *  [brendadada](https://wordpress.org/support/users/brendadada/)
 * (@brendadada)
 * [18 years ago](https://wordpress.org/support/topic/fatal-error-call-to-undefined-function-get_shortcode_regex/#post-750100)
 * I had used the automatic upgrade plugin suggested above and got exactly the same
   error message.
 * Have just replaces shortcodes.php with a new one from a copy of 2.5.1 and now
   my blog doesn’t load at all. Urgl!
 * Any suggestions?
 *  [ipaulpro](https://wordpress.org/support/users/ipaulpro/)
 * (@ipaulpro)
 * [18 years ago](https://wordpress.org/support/topic/fatal-error-call-to-undefined-function-get_shortcode_regex/#post-750135)
 * brendadada –
 * What ftp program are you using? Sometimes errors in the FTP upload process will
   cause these types of errors. Re-upload all of the 2.5.1 files BESIDES ‘wp-content’
   and ‘wp-config.php’. If you are still having this problem, use a different FTP
   program.
 * I just had the same issue. After a restart of the FTP program and overwrite of
   the files (minus above), everything works fine.
 * Let me know how it goes.
 *  [sleepywhisper](https://wordpress.org/support/users/sleepywhisper/)
 * (@sleepywhisper)
 * [18 years ago](https://wordpress.org/support/topic/fatal-error-call-to-undefined-function-get_shortcode_regex/#post-750138)
 * hey guys, same problem – but made harder.
 * I am getting that same error …shortcode… when I try and use the utoupdater it
   wont let me saying
    _ “Warning: copy(/home/guycross/public\_html/wordpress/index.
   php) [function.copy]: failed to open stream: No such file or directory in /home/
   guycross/public\_html/wordpress/wp-content/plugins/wordpress-automatic-upgrade/
   wpau\_upgrade.class.php on line 321 We could not complete the upgrade please 
   try again later, click here to check the logs”
 * so I havent a clue what to do, ideas?
    fortunately my website lets me into the
   admin pages, which others dont seem to be getting….
 *  [sleepywhisper](https://wordpress.org/support/users/sleepywhisper/)
 * (@sleepywhisper)
 * [18 years ago](https://wordpress.org/support/topic/fatal-error-call-to-undefined-function-get_shortcode_regex/#post-750139)
 * i just deleted the line of code, works fine now
 * note to self to upgrade next time around, hopefully get a fixedline 95 back then!!!!
 *  [KB](https://wordpress.org/support/users/hardaka/)
 * (@hardaka)
 * [18 years ago](https://wordpress.org/support/topic/fatal-error-call-to-undefined-function-get_shortcode_regex/#post-750153)
 * I tried the fixes mentioned above, tried different FTP programs, and this problem
   wouldn’t go away. Even tried uploading the files from wordpress that works fine
   on my localhost. Still got the error.
 * The fix that worked for me was deleting line 95.
 * Is this going to cause future problems upgrading again (with the database) or
   shouldn’t have to worry?
 *  [zombat](https://wordpress.org/support/users/zombat/)
 * (@zombat)
 * [17 years, 12 months ago](https://wordpress.org/support/topic/fatal-error-call-to-undefined-function-get_shortcode_regex/#post-750159)
 * Hey everyone, I had this same problem as well.
 * Rather than delete line 95 however, I ended up adding the following line to the
   top of wp-includes/formatting.php:
 * `require_once('shortcodes.php');`
 * That solved the problem, and line 95 still gets to do whatever it’s doing.

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

The topic ‘Fatal Error: Call to undefined function get_shortcode_regex()’ is closed
to new replies.

## Tags

 * [fatal error](https://wordpress.org/support/topic-tag/fatal-error/)
 * [formatting](https://wordpress.org/support/topic-tag/formatting/)
 * [formatting.php](https://wordpress.org/support/topic-tag/formatting-php/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 14 replies
 * 12 participants
 * Last reply from: [zombat](https://wordpress.org/support/users/zombat/)
 * Last activity: [17 years, 12 months ago](https://wordpress.org/support/topic/fatal-error-call-to-undefined-function-get_shortcode_regex/#post-750159)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
