In some situation your server’s userdata files (/var/cpanel/userdata/ directory comprises for each account) may get corrupted or can be entirely missing.

Steps to rebuild userdata files with a valid httpd.conf file

1. The corrupt userdata directory must be moved to a new location.

You can do this by using the mv command to move the directory and its contents to a new location.
mv /var/cpanel/userdata /var/cpanel/userdata.orig

The corrupt userdata directory must be moved to a new location.

2. A new userdata directory must be created.

To create new user data directory use mkdir command
mkdir /var/cpanel/userdata

A new userdata directory must be created

3. To rebuild userdata files run userdata_update script

The /usr/local/cpanel/bin/userdata_update script restores userdata files for all of the accounts that are present on your server.
/usr/local/cpanel/bin/userdata_update –reset

To rebuild userdata files run userdata_update script

4. To validate the userdata permissions settings run the script fix_userdata_perms

The /usr/local/cpanel/bin/fix_userdata_perms script makes certain that all of your server’s userdata files and directories are assigned the correct permissions settings.
/usr/local/cpanel/bin/fix_userdata_perms

To validate the userdata permissions settings run the script fix_userdata_perms

5. To update the system’s cache run script updateuserdatacache.

The /scripts/updateuserdatacache script makes sure that the system appropriately caches all userdata files.
/scripts/updateuserdatacache

To update the system's cache run script updateuserdatacache

6. Restore Apache.

To use the rebuilt userdata files, you must rebuild Apache.
/scripts/rebuildhttpdconf

6. Restore Apache.

7. Apache Restart is required

Restart Apache on your server after you rebuild it.
/scripts/restartsrv_httpd

Apache Restart is required