Title: Uncaught Error: Call to undefined function wp_parse_url()
Last modified: August 18, 2022

---

# Uncaught Error: Call to undefined function wp_parse_url()

 *  Resolved [pawkat](https://wordpress.org/support/users/pawkat/)
 * (@pawkat)
 * [3 years, 9 months ago](https://wordpress.org/support/topic/uncaught-error-call-to-undefined-function-wp_parse_url/)
 * Hi, I got an error, could you please help me with it? Maybe I should change some
   settings to prevent it?
 *     ```
       Uncaught Error: Call to undefined function wp_parse_url() in /opt/bitnami/apps/wordpress/htdocs/wp-includes/formatting.php:4401\nS
       tack trace:\n
   
       #0 /opt/bitnami/apps/wordpress/htdocs/wp-includes/formatting.php(4473): esc_url('/index.php?s=/I...', NULL, 'db')\n
       #1 /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/w3-total-cache/DbCache_WpdbInjection_QueryCaching.php(600): esc_url_raw('/index.php?s=/I...')\n
       #2 /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/w3-total-cache/DbCache_WpdbInjection_QueryCaching.php(545): W3TC\\DbCache_WpdbInjection_QueryCaching->_check_request_uri()\n
       #3 /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/w3-total-cache/DbCache_WpdbInjection_QueryCaching.php(461): W3TC\\DbCache_WpdbInjection_QueryCaching->_can_cache_once_per_request()\n
       #4 /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/w3-total-cache/DbCache_WpdbInjection_QueryCaching.php(125): W3TC\\DbCache_WpdbInjection_QueryCaching->_can_cache('SELECT option_n...', '')\n
       #5 /opt/bitnami/apps/...PHP message: PHP Fatal error:  Uncaught Error: Call to undefined function wp_parse_url() in /opt/bitnami/apps/wordpress/htdocs/wp-includes/formatting.php:4401\nStack trace:\n
   
       #0 /opt/bitnami/apps/wordpress/htdocs/wp-includes/formatting.php(4473): esc_url('/index.php?s=/I...', NULL, 'db')\n
       #1 /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/w3-total-cache/DbCache_WpdbInjection_QueryCaching.php(600): esc_url_raw('/index.php?s=/I...')\n
       #2 /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/w3-total-cache/DbCache_WpdbInjection_QueryCaching.php(545): W3TC\\DbCache_WpdbInjection_QueryCaching->_check_request_uri()\n
       #3 /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/w3-total-cache/DbCache_WpdbInjection_QueryCaching.php(461): W3TC\\DbCache_WpdbInjection_QueryCaching->_can_cache_once_per_request()\n
       #4 /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/w3-total-cache/DbCache_WpdbInjection_QueryCaching.php(125): W3TC\\DbCache_WpdbInjection_QueryCaching->_can_cache('SELECT option_n...', '')\n
       #5 /opt/bitnami/apps/...', referer: https://18.198.218.81:443/index.php?s=/Index/\\think\\app/invokefunction&function=call_user_func_array&vars[0]=md5&vars[1][]=HelloThinkPHP21
       ```
   

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

 *  Plugin Contributor [Marko Vasiljevic](https://wordpress.org/support/users/vmarko/)
 * (@vmarko)
 * [3 years, 9 months ago](https://wordpress.org/support/topic/uncaught-error-call-to-undefined-function-wp_parse_url/#post-15928336)
 * Hello [@pawkat](https://wordpress.org/support/users/pawkat/)
 * I am sorry about the issue you are experiencing and I am happy to assist you 
   with this.
    Can you please confirm if this error started to occur after the latest
   W3TC update? Can you please replace the existing /wp-content/plugins/w3-total-
   cache/DbCache_WpdbInjection_QueryCaching.php with the one you can [download here](https://www.boldgrid.com/support/wp-content/uploads/2022/08/DbCache_WpdbInjection_QueryCaching.zip)?
   Please let me know if you are still experiencing the problem after this.
 *  Thread Starter [pawkat](https://wordpress.org/support/users/pawkat/)
 * (@pawkat)
 * [3 years, 9 months ago](https://wordpress.org/support/topic/uncaught-error-call-to-undefined-function-wp_parse_url/#post-15930737)
 * [@vmarko](https://wordpress.org/support/users/vmarko/)
    Can you please confirm
   if this error started to occur after the latest W3TC update? – I think yes, I
   have not seen such an error before. Can you please replace the existing /wp-content/
   plugins/w3-total-cache/DbCache_WpdbInjection_QueryCaching.php with the one you
   can download here? – okay, I will try, thank you.
 *  Thread Starter [pawkat](https://wordpress.org/support/users/pawkat/)
 * (@pawkat)
 * [3 years, 9 months ago](https://wordpress.org/support/topic/uncaught-error-call-to-undefined-function-wp_parse_url/#post-15942031)
 * Hi [@vmarko](https://wordpress.org/support/users/vmarko/), we had replaced file,
   I will let you know if we will faced the same issue
 *  Thread Starter [pawkat](https://wordpress.org/support/users/pawkat/)
 * (@pawkat)
 * [3 years, 9 months ago](https://wordpress.org/support/topic/uncaught-error-call-to-undefined-function-wp_parse_url/#post-15942087)
 * [@vmarko](https://wordpress.org/support/users/vmarko/) for now seems that problem
   is fixed. would these changes be added to the next plugin version?
 *  Plugin Contributor [Marko Vasiljevic](https://wordpress.org/support/users/vmarko/)
 * (@vmarko)
 * [3 years, 9 months ago](https://wordpress.org/support/topic/uncaught-error-call-to-undefined-function-wp_parse_url/#post-15944817)
 * Hello [@pawkat](https://wordpress.org/support/users/pawkat/)
 * Thank you for your feedback and I am glad to know that the problem is fixed after
   updating the file.
    This will be fixed in the next release. Thanks!
 *  Plugin Contributor [Marko Vasiljevic](https://wordpress.org/support/users/vmarko/)
 * (@vmarko)
 * [3 years, 9 months ago](https://wordpress.org/support/topic/uncaught-error-call-to-undefined-function-wp_parse_url/#post-15946998)
 * Hello [@pawkat](https://wordpress.org/support/users/pawkat/)
 * Thank you once again for your patience.
    We have a fix for this issue and can
   you please make sure that you are using the latest release with which you’ve 
   experienced the problem and make sure to implement the changes you can find in
   [this pull request that should fix the problem](https://github.com/W3EDGE/w3-total-cache/pull/549/commits/4ba2b5932f35c89354e7ab139f37d9482edf23a2)?
   This is different than the solution previously provided as we have to pay attention
   to wp guidelines. Thank you in advance
 *  Thread Starter [pawkat](https://wordpress.org/support/users/pawkat/)
 * (@pawkat)
 * [3 years, 9 months ago](https://wordpress.org/support/topic/uncaught-error-call-to-undefined-function-wp_parse_url/#post-15948087)
 * Hi [@vmarko](https://wordpress.org/support/users/vmarko/), ok we will try new
   solution
 *  [aaronrobb](https://wordpress.org/support/users/aaronrobb/)
 * (@aaronrobb)
 * [3 years, 8 months ago](https://wordpress.org/support/topic/uncaught-error-call-to-undefined-function-wp_parse_url/#post-16048135)
 * [@vmarko](https://wordpress.org/support/users/vmarko/) Is there a solution to
   this issue that doesn’t involve editing the plugin code?
 * With our system, we run plugins with Composer, so pushing plugin code changes
   to our stage or live server are ignored as the whole plugin folder is ignored.
 * This error shows up when updating to php8.1.
    -  This reply was modified 3 years, 8 months ago by [aaronrobb](https://wordpress.org/support/users/aaronrobb/).
 *  [aaronrobb](https://wordpress.org/support/users/aaronrobb/)
 * (@aaronrobb)
 * [3 years, 8 months ago](https://wordpress.org/support/topic/uncaught-error-call-to-undefined-function-wp_parse_url/#post-16048171)
 * Just a note- Turning off the DB Cache clears the error as a temporary fix.
    Not
   ideal, but page loads at least.

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

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

 * ![](https://ps.w.org/w3-total-cache/assets/icon-256x256.png?rev=1041806)
 * [W3 Total Cache](https://wordpress.org/plugins/w3-total-cache/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/w3-total-cache/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/w3-total-cache/)
 * [Active Topics](https://wordpress.org/support/plugin/w3-total-cache/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/w3-total-cache/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/w3-total-cache/reviews/)

## Tags

 * [undefined function](https://wordpress.org/support/topic-tag/undefined-function/)

 * 9 replies
 * 3 participants
 * Last reply from: [aaronrobb](https://wordpress.org/support/users/aaronrobb/)
 * Last activity: [3 years, 8 months ago](https://wordpress.org/support/topic/uncaught-error-call-to-undefined-function-wp_parse_url/#post-16048171)
 * Status: resolved