• JOHN S.

    (@emergencyloan)


    Hello,

    I can’t create a new post or page.

    It happened unexpectedly. I hadn’t published anything on the site for about a year. Then, when I decided to create a new page, I saw this error.

    I’m seeing this error: “There has been a critical error on this website. Please check your site admin email inbox for instructions. If you continue to have problems, please try the support forums.”.

    Running the latest version of WordPress.
    All plugins are updated (I also tried renaming the plugins folder).
    PHP version 8.2.

    What could be the issue?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Moderator threadi

    (@threadi)

    The reason for the error should be visible in the error log. You can find it in your hosting area. If necessary, the support of your hosting can help you.

    Alternatively, you could also enable debugging in WordPress. How to do this is described here: https://developer.wordpress.org/advanced-administration/debug/debug-wordpress/ – also here the support of your hosting can help you if necessary to edit the file accordingly.

    In both cases you should be able to see what the cause is in the logfile.

    Thread Starter JOHN S.

    (@emergencyloan)

    I added “WP_DEBUG” to the wp-config.php file, but the error log file didn’t appear.

    Moderator threadi

    (@threadi)

    In addition to setting WP_DEBUG, you must also set WP_DEBUG_LOG. Then, reload the page to trigger the error. After that, a debug.log file should appear in the wp-content directory.

    Thread Starter JOHN S.

    (@emergencyloan)

    After that, a debug.log file should appear in the wp-content directory.

    No such file((

    I tried adding these lines:

    // Enable Debug logging to the /wp-content/debug.log file
    define( ‘WP_DEBUG_LOG’, true );

    // Enable Debug logging to the /wp-content/debug.log file
    define( ‘WP_DEBUG_LOG’, true );

    And these too:

    // Disable display of errors and warnings
    define( ‘WP_DEBUG_DISPLAY’, false );
    @ini_set( ‘display_errors’, 0 );

    // Use dev versions of core JS and CSS files (only needed if you are modifying these core files)
    define( ‘SCRIPT_DEBUG’, true );

    Moderator threadi

    (@threadi)

    I don’t know if you just copied it wrong, but something’s still off. The correct version would be:

    // Enable Debug logging
    define( 'WP_DEBUG', true );

    // Enable Debug logging to the /wp-content/debug.log file
    define( 'WP_DEBUG_LOG', true );

    And if that just won’t work, contact your hosting provider’s support team to request their error log, which should actually contain that information.

    Thread Starter JOHN S.

    (@emergencyloan)

    Oh my god, really… Thanks so much for your help!

    Judging by the errors, it seems like the problem is with the theme? That’s odd, since I didn’t make any changes. The problem with creating new pages/posts just appeared out of the blue.

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

You must be logged in to reply to this topic.