Title: PHP Fatal error in Util_Ui.php
Last modified: April 17, 2024

---

# PHP Fatal error in Util_Ui.php

 *  Resolved [aidezmoi](https://wordpress.org/support/users/aidezmoi/)
 * (@aidezmoi)
 * [2 years, 1 month ago](https://wordpress.org/support/topic/php-fatal-error-in-util_ui-php/)
 * Hello,
   After migrating a website to a new Nginx server, I have a critical error
   that prevents total cache from working. The site is still working.Here is the
   log :
 * `PHP Fatal error: Uncaught Error: Class "DOMDocument" not found in /var/www/admin.
   domainename.com/wp-content/plugins/w3-total-cache/Util_Ui.php:1486
   Stack trace:#
   0 /var/www/admin.domainename.com/wp-content/plugins/w3-total-cache/inc/options/
   common/top_nav_bar.php(158): W3TC\Util_Ui::get_allowed_html_for_wp_kses_from_content()#
   1 /var/www/admin.domainename.com/wp-content/plugins/w3-total-cache/Generic_Plugin_Admin.
   php(354): require('…') #2 /var/www/admin.domainename.com/wp-includes/class-wp-
   hook.php(324): W3TC\Generic_Plugin_Admin->top_nav_bar() #3 /var/www/admin.domainename.
   com/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters() #4 /var/www/
   admin.domainename.com/wp-includes/plugin.php(517): WP_Hook->do_action() #5 /var/
   www/admin.domainename.com/wp-admin/admin-header.php(303): do_action() #6 /var/
   www/admin.domainename.com/wp-admin/admin.php(239): require_once('…') #7 {main}
   thrown in /var/www/admin.domainename.com/wp-content/plugins/w3-total-cache/Util_Ui.
   php on line 1486
 * I alredy try this instructions : [https://wordpress.org/support/topic/critical-error-640/](https://wordpress.org/support/topic/critical-error-640/).
 * Do you have an idea ? Thank you.

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

 *  Plugin Contributor [Marko Vasiljevic](https://wordpress.org/support/users/vmarko/)
 * (@vmarko)
 * [2 years, 1 month ago](https://wordpress.org/support/topic/php-fatal-error-in-util_ui-php/#post-17693297)
 * Hello [@aidezmoi](https://wordpress.org/support/users/aidezmoi/) 
   Thank you for
   reaching out and I am happy to help!
 * Wen you say that it prevents W3TC from working can you please elaborate on that?
   
   It appears that some files are missing aftrer the migration. Just to confirm,
   you tried completly removing and re-installing the plugin?Thanks!
 *  Thread Starter [aidezmoi](https://wordpress.org/support/users/aidezmoi/)
 * (@aidezmoi)
 * [2 years, 1 month ago](https://wordpress.org/support/topic/php-fatal-error-in-util_ui-php/#post-17693458)
 * I uninstalled and reinstalled the plugin, and cleaned up the nging.conf file (
   =.htacces in appache) and the files in wpcontent as indicated in the link. I 
   tried with no other plugin enabled too.
 * I can access the plugin menu, but only the top bar appears. The message “critical
   error” is displayed in the “settings” dropdown.
 *  Plugin Contributor [Marko Vasiljevic](https://wordpress.org/support/users/vmarko/)
 * (@vmarko)
 * [2 years, 1 month ago](https://wordpress.org/support/topic/php-fatal-error-in-util_ui-php/#post-17694108)
 * Hello [@aidezmoi](https://wordpress.org/support/users/aidezmoi/)
 * Thank you for your feedback.
   It seems that you need to install additional php
   package:[https://stackoverflow.com/questions/14395239/class-domdocument-not-found](https://stackoverflow.com/questions/14395239/class-domdocument-not-found)
 * Normaly it should be installed by default, however, in some cases, the pachage
   needs to be re-installed or installed if it’s missing.
   I would advise you reaching
   out to your hosting provider to check this.
 * Thanks!
 *  Thread Starter [aidezmoi](https://wordpress.org/support/users/aidezmoi/)
 * (@aidezmoi)
 * [2 years, 1 month ago](https://wordpress.org/support/topic/php-fatal-error-in-util_ui-php/#post-17695569)
 * Hi,
 * It was indeed the php dom extension that was not installed on the server. It 
   works now.
 * Thank you for your help.
 *  Plugin Contributor [Marko Vasiljevic](https://wordpress.org/support/users/vmarko/)
 * (@vmarko)
 * [2 years, 1 month ago](https://wordpress.org/support/topic/php-fatal-error-in-util_ui-php/#post-17697055)
 * Hello [@aidezmoi](https://wordpress.org/support/users/aidezmoi/)
 * You are most welcome!
 * We would really appreciate it if you could take a minute and post a review [here](https://wordpress.org/support/plugin/w3-total-cache/reviews/).
   This will help us to continue offering a top-notch product to users.
   Thanks!

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

The topic ‘PHP Fatal error in Util_Ui.php’ is closed to new replies.

 * ![](https://ps.w.org/w3-total-cache/assets/icon-256x256.png?rev=1041806)
 * [W3 Total Cache](https://wordpress.org/plugins/w3-total-cache/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/w3-total-cache/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/w3-total-cache/)
 * [Active Topics](https://wordpress.org/support/plugin/w3-total-cache/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/w3-total-cache/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/w3-total-cache/reviews/)

 * 5 replies
 * 2 participants
 * Last reply from: [Marko Vasiljevic](https://wordpress.org/support/users/vmarko/)
 * Last activity: [2 years, 1 month ago](https://wordpress.org/support/topic/php-fatal-error-in-util_ui-php/#post-17697055)
 * Status: resolved