• Resolved davidreedernst

    (@davidreedernst)


    I just moved a WordPress site from shared hosting to a VPS. In the process we upgraded to PHP 8.1. When I try to load our home page, it crashes, and I get this in the apache error logs:

    Got error 'PHP message: PHP Fatal error:  Uncaught Error: Class "DOMDocument" not found in wproot/wp-content/plugins/editorplus/includes/class-editorplus-styles-manager.php:61
    
    Stack trace:
    #0 wproot/wp-includes/class-wp-hook.php(309): EditorPlus_Styles_Manager->prepare_blocks_for_styles()
    #1 wproot/wp-includes/plugin.php(191): WP_Hook->apply_filters()
    #2 wproot/wp-includes/class-wp-block.php(284): apply_filters()
    #3 wproot/wp-includes/blocks.php(901): WP_Block->render()
    #4 wproot/wp-includes/blocks.php(939): render_block()
    #5 wproot/wp-includes/class-wp-hook.php(307): do_blocks()
    #6 wproot/wp-includes/plugin.php(191): WP_Hook->apply_filters()
    #7 wproot/wp-includes/post-template.php(253): apply_filters()
    #8 /...'

    If I disable the plugin, everything seems to work fine. But, of course, we want the plugin! 🙂

    In theory this could be a permissions problem or something, but I feel like I have that all set correctly. Any guesses? Googling the error message turned up nothing, so this seems to be either something very new or something I’ve got configured wrong. I’d appreciate any hints you can offer.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support zafarkamal

    (@zafarkamal)

    Hey @davidreedernst,

    Thank you to report this issue. We were unable to replicate this issue from our end, but from a higher-overview, It seems like your server may have a required missing php extension which is used by editorplus. Can you please verify if the php “dom” extension is installed properly on your server?

    Thread Starter davidreedernst

    (@davidreedernst)

    You nailed it! A quick search got me to the PHP.net page about the DOM extension, where someone had commented that this isn’t installed by default on Ubuntu 20. Following their instructions, I ran

    sudo apt-get install php-xml

    and suddenly everything worked fine. Woohoo!

    Sorry to bother you, but you certainly saved me a ton of time trying to troubleshoot this from scratch. Thank you!

    Plugin Author Munir Kamal

    (@munirkamal)

    Hey @davidreedernst

    Glad we could help you resolve that issue, and everything works as expected now. If you are happy with EditorPlus, I’ll appreciate your rating & feedback if possible.
    https://ww.wp.xz.cn/support/plugin/editorplus/reviews/#new-post

    Cheers,
    Munir

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

The topic ‘Fatal Uncaught Error: Class “DOMDocument” not found’ is closed to new replies.