cPanel uses userdata files to keep information about addon domains, parked domains, IPs, PHP versions used by accounts etc. If you came to the conclusion that the cPanel userdata files are corrupted, you can rebuild them. The process detailed below will be possible only if you have a valid httpd.conf file.

How to rebuild corrupted userdata files in cPanel/WHM

1. Log into your cPanel/WHM server with the root credentials

2. Move the existing userdata files to a new location. Use:

mv /var/cpanel/userdata /var/cpanel/userdata-original

3. Re-create the userdata directory with this command:

mkdir /var/cpanel/userdata

3. Run the cPanel utility that will generate the new userdata files. The command is:

/usr/local/cpanel/bin/userdata_update --reset

The –reset flag will regenerate the files from the httpd.conf file. This is the main command of the process. You can find out more about it by:

/usr/local/cpanel/bin/userdata_update --help
[email protected] [~]# /usr/local/cpanel/bin/userdata_update --help
Usage: userdata_update [--reset] [--unpark_addons] [--help | --usage]
    IMPORTANT! Do not conserve existing userdata and regenerate new userdata files
    based upon the current Apache configuration file. This should be used as a last resort.

    Fix instances where an addon domain is also listed as a parked domain. This flag will
    result in a reset of all userdata files. See "--reset" warnings for more information.

    Display usage information

[email protected] [~]#

4. Run the cPanel utility to verify that all the directories and files have the correct permissions set:


5. Run this cPanel script to update the system cache, as the new files and directories have just been generated


6. Apache must be rebuilt. Use the command:


7. Now Apache webserver must be restarted. This is the last step of the tutorial.

cpanel userdata
cPanel userdata files for an account