I’m getting the following message when trying to clear my cache.
Something went wrong
preg_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in style.php on line 2
This started because I have been getting the following error message on my Wordpress blog and I tried to clear the cache in the hope it might help.
Fatal error: Uncaught Error: Call to undefined function wp() in /misc/36/328/452/530/1/user/web/bretculp.bravehost.com/bret-culp-photography-blog/wp-blog-header.php:16 Stack trace: #0 /misc/36/328/452/530/1/user/web/bretculp.bravehost.com/bret-culp-photography-blog/index.php(17): require() #1 {main} thrown in /misc/36/328/452/530/1/user/web/bretculp.bravehost.com/bret-culp-photography-blog/wp-blog-header.php on line 16
My actual goal is to delete my WP blog but I can’t even get into it because of the error.
What is the proper way to fully delete a WP blog on Backlight?
Thanks, Rod. I updated from php version 8.2.x to 8.3.x and I still get the error message when I try to clear the template cache.
Also, I can’t get into WP to make sure it’s updated because of the error. If I delete the WP directory do you think it would fix the clear cache problem?
Does the WP template need to be addressed in Backlight? If I try to “re-export theme to Wordpress” I get the same template cache error. In fact, I think this is where the following error started.
preg_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in style.php on line 2
That will delete the blog (assuming your blog is in the WP/ directory.
I doubt it. The “deprecated” message suggests something’s not compatible with the version of php you’re using.
If you haven’t updated the version of WordPress you’re using for a while, it could be that the php error is due to a newer version of php that isn’t compatible with the version of WordPress you have installed. You might try reverting to earlier versions of php
It may not have been updated in the past several months, but it shouldn’t be too behind, if at all. Unfortunately, I can’t get into WP at all to check or update due to the error.
If your goal is still to just delete the blog, you can do that by deleting the folder that contains the WordPress files. If you installed WordPress into a folder named “blog”, delete that folder or just all the files inside of it.
But if you still need to get into WordPress, you might try posting the problem on a WordPress specific forum. Someone on one of those might have ideas of how to access an inaccessible WP admin.
Is there a way to force Backlight to generate a new wp-config.php file? I tracked down that it was completely empty. Note that I recently changed my website domain, which is where this all started. Note that everything else on my site is working, and I changed the site and Wordpress URL in Blacklight Settings to reflect this change.
No. Backlight only creates WordPress themes.
You can download the WP files from wordpress.org and then upload a fresh wp-config.php file to the blog’s root folder