Critical Error Adding Users (New Install)
-
Hi,
I have a new install of WordPress (deleted and reinstalled to see if it would fix the issue). In wp-admin when I click to add a new user, every time I get an error “There has been a critical error on this website. Please check your site admin email inbox for instructions.” (I dont receive any email neither).
The user is still created and it seems fine after that. But it’s the fact it’s doing it in the first place is frustrating me. I have tried using the default theme with 0 plugins activated yet it still happens.
If anyone could provide any advice on how to fix it I would greatly appreciate it.
Thanks in advance
-
Errors like this are logged. Check the error log on your server. If you can’t find the log, please contact your host.
Meantime, enable wp_debug and wp_debug_log and after an error, look at wp-content/debug.log to see if anything gets logged there. https://ww.wp.xz.cn/support/article/debugging-in-wordpress/
You can also try this: Please attempt to disable all plugins, and use one of the default (Twenty*) themes. If the problem goes away, enable them one by one to identify the source of your troubles.
If you cannot access wp-admin, there are other ways to deactivate plugins: https://ww.wp.xz.cn/support/article/faq-troubleshooting/#how-to-deactivate-all-plugins-when-not-able-to-access-the-administrative-menus
Hi, it is a new install with the default 2024 theme and no plugins installed. I cannot find any error log neither.
Did you enable debugging?
By adding the code to wp-config? Yes
So, if no log appears in wp-contents, then the problem may be happening before logging gets enabled. Just to be sure it’s a good install, go to UPDATES on the dashboard and click the button to re-install.
If you can get to tools->site health, can you copy/paste the report?

` wp-core
version: 6.6.2
site_language: en_US
user_language: en_US
timezone: +00:00
permalink: /%postname%/
https_status: true
multisite: false
user_registration: 0
blog_public: 1
default_comment_status: open
environment_type: production
user_count: 4
dotorg_communication: true wp-paths-sizes
wordpress_path: /home/SITE NAME/public_html
wordpress_size: 55.37 MB (58061587 bytes)
uploads_path: /home/SITE NAME/public_html/wp-content/uploads
uploads_size: 11.81 MB (12383183 bytes)
themes_path: /home/SITE NAME/public_html/wp-content/themes
themes_size: 14.96 MB (15682725 bytes)
plugins_path: /home/SITE NAME/public_html/wp-content/plugins
plugins_size: 112.82 MB (118298089 bytes)
fonts_path: /home/SITE NAME/public_html/wp-content/uploads/fonts
fonts_size: directory not found
database_size: 3.07 MB (3221482 bytes)
total_size: 198.03 MB (207647066 bytes) wp-active-theme
name: TechStore (techstore)
version: 1.5
author: Hex-WP
author_website: (undefined)
parent_theme: none
theme_features: core-block-patterns, widgets-block-editor, post-thumbnails, title-tag, automatic-feed-links, woocommerce, widgets
theme_path: /home/SITE NAME/public_html/wp-content/themes/techstore
auto_update: Disabled wp-themes-inactive (1)
Twenty Twenty-Four: version: 1.2, author: the WordPress team, Auto-updates disabled wp-plugins-active (10)
Classic Editor: version: 1.6.5, author: WordPress Contributors, Auto-updates disabled
Contact Form 7: version: 5.9.8, author: Takayuki Miyoshi, Auto-updates disabled
Elementor: version: 3.25.0, author: Elementor.com, Auto-updates disabled
LiteSpeed Cache: version: 6.5.2, author: LiteSpeed Technologies, Auto-updates disabled
Maintenance: version: 4.15, author: WebFactory Ltd, Auto-updates disabled
Visual Header: version: 1.3, author: visual-header, Auto-updates disabled
Visual Slider: version: 1.1.1, author: Visual-Slider, Auto-updates disabled
WooCommerce: version: 9.4.0-rc.1, author: Automattic, Auto-updates disabled
YITH WooCommerce Compare: version: 2.43.0, author: YITH, Auto-updates disabled
YITH WooCommerce Wishlist: version: 4.0.0, author: YITH, Auto-updates disabled wp-media
image_editor: WP_Image_Editor_GD
imagick_module_version: Not available
imagemagick_version: Not available
imagick_version: Not available
file_uploads: 1
post_max_size: 4096M
upload_max_filesize: 4096M
max_effective_size: 4 GB
max_file_uploads: 20
gd_version: bundled (2.1.0 compatible)
gd_formats: GIF, JPEG, PNG, WebP, BMP, AVIF, XPM
ghostscript_version: unknown wp-server
server_architecture: Linux 4.18.0-553.lve.el8.x86_64 x86_64
httpd_software: Apache
php_version: 8.3.12 64bit
php_sapi: fpm-fcgi
max_input_variables: 1000
time_limit: 300
memory_limit: 4096M
max_input_time: 300
upload_max_filesize: 4096M
php_post_max_size: 4096M
curl_version: 7.61.1 OpenSSL/1.1.1k
suhosin: false
imagick_availability: false
pretty_permalinks: true
htaccess_extra_rules: true
current: 2024-10-28T17:17:27+00:00
utc-time: Monday, 28-Oct-24 17:17:27 UTC
server-time: 2024-10-28T17:17:25+00:00 wp-database
extension: mysqli
server_version: 10.11.9-MariaDB
client_version: mysqlnd 8.3.12
max_allowed_packet: 268435456
max_connections: 2000 wp-constants
WP_HOME: undefined
WP_SITEURL: undefined
WP_CONTENT_DIR: /home/SITE NAME/public_html/wp-content
WP_PLUGIN_DIR: /home/SITE NAME/public_html/wp-content/plugins
WP_MEMORY_LIMIT: 128M
WP_MAX_MEMORY_LIMIT: 4096M
WP_DEBUG: false
WP_DEBUG_DISPLAY: false
WP_DEBUG_LOG: true
SCRIPT_DEBUG: false
WP_CACHE: true
CONCATENATE_SCRIPTS: undefined
COMPRESS_SCRIPTS: undefined
COMPRESS_CSS: undefined
WP_ENVIRONMENT_TYPE: Undefined
WP_DEVELOPMENT_MODE: undefined
DB_CHARSET: utf8mb4
DB_COLLATE: undefined wp-filesystem
wordpress: writable
wp-content: writable
uploads: writable
plugins: writable
themes: writable
fonts: not writableI have re-activated the theme and plugins as I figured that wasn’t the issue if it still does it with them all disabled.
I have also searched the forum and there seems to be a few instances of the same issue but no solutions.
Make all of these “true”:
WP_DEBUG: false
WP_DEBUG_DISPLAY: false
WP_DEBUG_LOG: trueThanks. I now see the following error in place of the critical error…
Fatal error: Uncaught Error: Call to undefined function PHPMailer\PHPMailer\mail() in /home/SITE NAME/public_html/wp-includes/PHPMailer/PHPMailer.php:881 Stack trace: #0 /home/SITE NAME/public_html/wp-includes/PHPMailer/PHPMailer.php(1972): PHPMailer\PHPMailer\PHPMailer->mailPassthru(‘contact@shopine…’, ‘[SITE NAME] New …’, ‘New user regist…’, ‘Date: Mon, 28 O…’, NULL) #1 /home/SITE NAME/public_html/wp-includes/PHPMailer/PHPMailer.php(1693): PHPMailer\PHPMailer\PHPMailer->mailSend(‘Date: Mon, 28 O…’, ‘New user regist…’) #2 /home/SITE NAME/public_html/wp-includes/PHPMailer/PHPMailer.php(1525): PHPMailer\PHPMailer\PHPMailer->postSend() #3 /home/SITE NAME/public_html/wp-includes/pluggable.php(546): PHPMailer\PHPMailer\PHPMailer->send() #4 /home/SITE NAME/public_html/wp-includes/pluggable.php(2190): wp_mail(Array, ‘[SITE NAME] New …’, ‘New user regist…’, Array) #5 /home/SITE NAME/public_html/wp-includes/user.php(3503): wp_new_user_notification(13, NULL, ‘admin’) #6 /home/SITE NAME/public_html/wp-includes/class-wp-hook.php(324): wp_send_new_user_notifications(13, ‘admin’) #7 /home/SITE NAME/public_html/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(”, Array) #8 /home/SITE NAME/public_html/wp-includes/plugin.php(517): WP_Hook->do_action(Array) #9 /home/SITE NAME/public_html/wp-admin/includes/user.php(247): do_action(‘edit_user_creat…’, 13, ‘admin’) #10 /home/SITE NAME/public_html/wp-admin/user-new.php(195): edit_user() #11 {main} thrown in /home/SITE NAME/public_html/wp-includes/PHPMailer/PHPMailer.php on line 881
There has been a critical error on this website. Please check your site admin email inbox for instructions.Interesting. It looks like your host (or you, if this is your own server) have not installed or disabled PHP’s mail() function. I’m not sure where this is in Red Hat Linux (el8, in your linux version is the clue), but if you’re using cPanel to manage it, see https://support.cpanel.net/hc/en-us/articles/1500007530882-How-to-disable-the-mail-for-PHP-to-help-prevent-email-abuse-or-outgoing-spam or check php.ini: https://ioflood.com/blog/how-to-disable-the-php-mail-function/
Thank you for that. My hosting company have stated that because I’m on shared hosting it has been disabled for security purposes. They said to use a plugin as an alternative but I’m clueless with what to install. Any further help with that would be greatly appreciated also. Thanks again
https://ww.wp.xz.cn/plugins/search/smtp will find you several.
The topic ‘Critical Error Adding Users (New Install)’ is closed to new replies.