Adding custom error pages

Using customer error pages is a relatively simple task. Most modern content management systems have their own way of creating a custom error page or it can be achieved by adding a plugin that has this functionality.
If you would like to use a custom error page of your own this is also possible. You start with creating the desired page. It can be HTML, PHP an image or anything else you choose and that would suit your needs.
Once created you should also create an .htaccess file in the public_html directory containing the rewrite rules related to the error page:
Examples:
for custom 404 error page that you have named not_found.html you should add:

1
ErrorDocument 404 /~cpanel_username/not_found.html

for custom 500 error page that you have named internal_server_error.html you should add:

1
ErrorDocument 500 /~cpanel_username/internal_server_error.html

If you already have an .htaccess file you just need to add the corresponding lines inside by editing the file through cPanel -> File Manager or using external text editor locally on your computer.