Website getting http error 500


I’m getting http error 500

Fatal error : Uncaught Error: Call to undefined function str_contains() in /home/vol1000_8/ Stack trace: #0 /home/vol1000_8/ wp_initial_constants() #1 /home/vol1000_8/ require_once(‘/home/vol1000_8…’) #2 /home/vol1000_8/ require_once(‘/home/vol1000_8…’) #3 /home/vol1000_8/ require_once(‘/home/vol1000_8…’) #4 /home/vol1000_8/ require(‘/home/vol1000_8…’) #5 {main} thrown in /home/vol1000_8/ on line 121

the website was working fine today. And when I tried to check the website it is getting http 500 error. I’ve done Alter PHP Config and got this.

Hi and welcome to the forum! Seems like the WordPress developers added a breaking change on WordPress 6.3, since str_contains() is a PHP 8 function. I suggest to not update to WordPress 6.3 until the new PHP 8.1 rollout will complete, and instead keep WordPress 6.2.2 for now, but since you updated you’ll have to roll back.


I checked the WordPress source code, and this issue shouldn’t be happening.

Yes, str_contains is a PHP 8 function. But WordPress includes some code so it creates it’s own version of str_contains if it’s not provided by PHP, to ensure compatibility with older PHP versions.

If that’s not loaded, I suspect that there may be some code corruption in your WordPress installation. So you may want to try if this fixes it:


Hi there,
Thanks. It worked.

I’ve one more query. I’m getting this in my admin dashboard - “An automated WordPress update has failed to complete - [please attempt the update again now]”.
Is this the 6.3 update? When will the 6.3 update available for use?


It is not recommended to update directly in your wp-admin. You should open Softaculous to see if there’s an update available, or manually uploading the WordPress 6.3 to your website.


I have got Wordpress 6.3 update available now in Softaculous. So I can update from there, right? Will this error occur again after updating in Softaculous?


Not if you do this


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.