0

a friend of mine is running a WordPress site and suddenly started getting this error on administrative pages.

Warning: file_exists(): open_basedir restriction in effect. File(core/post-comments) is not within the allowed path(s): (/data/web/virtuals/269369/virtual) in /data/web/virtuals/269369/virtual/www/domains/mfproductions.cz/wp-includes/blocks.php on line 532

Hosting provider does not allow disabling open_basedir.

Can anyone help?

1 Answers1

0

this solution work for me.

In file wp-includes/blocks.php on line 532 change this:

if (is_string( $block_type ) && file_exists( $block_type ) ) {

to this: if ($block_type != "core/post-comments" && is_string( $block_type ) && file_exists( $block_type ) ) {

Then I would recommend to you update all plugins and WP core and reverse the change. I thing it will be ok. :)

Scriptable
  • 19,402
  • 5
  • 56
  • 72
  • So changing the code to avoid cases when $block_type is "core/post-comments" works. However after updating the plugins (WP is already the latest version) and reversing the code the problem persists. But thank you for the temporary solutiton. I will try to reverse it after WP gets an update – Kristýna Kořínková Nov 09 '22 at 09:06