Skip to content

Instantly share code, notes, and snippets.

@aliqasemzadeh
Last active April 16, 2023 17:14
Show Gist options
  • Save aliqasemzadeh/c5263bdcb272f93db3589e122d9beac8 to your computer and use it in GitHub Desktop.
Save aliqasemzadeh/c5263bdcb272f93db3589e122d9beac8 to your computer and use it in GitHub Desktop.
How to change public_html to public in cPanel
You need to access to main file of cPanel.
1-Find folder for user that want to change folder in:
/var/cpanel/userdata/:username
2-You see files by the following list:
cache
cache.json
main
main.cache
:username.tld
:username.tld.cache
:username.tld_SSL
:username.tld_SSL.cache
3-Find public_html in all files and replace with public.
4-Now run these command in terminal.
/scripts/rebuildhttpdconf
service httpd restart
5-Just change php one time.(eg: 8.1 => 8.2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment