You are currently viewing How To Add and Delete Apache Handlers In cPanel

How To Add and Delete Apache Handlers In cPanel

Apache Handlers play a crucial role in how your web server processes different types of files. In essence, they ensure that your website’s files are served to visitors in the correct format. Understanding how to manage Apache Handlers within cPanel is essential for website administrators looking to have finer control over their server’s behaviour. This comprehensive guide will walk you through the process of adding, deleting, and configuring Apache Handlers in cPanel, ensuring that your website runs smoothly and efficiently.

This blog is a part of our cPanel server management services where we make sure your cPanel server works efficiently with any issues.

What are Apache Handlers?

Apache Handlers are a set of instructions that tell the Apache web server how to process certain types of files. When a file is requested, the server uses the handler to determine how to serve that file to the visitor. For instance, you might have files that need to be processed by a PHP interpreter or served as plain HTML. By configuring Apache Handlers, you can dictate these processes, optimising your website’s performance and resource usage.

Accessing Apache Handlers in cPanel

To begin managing your Apache Handlers, you first need to access the cPanel dashboard for your hosting account. Once logged in, navigate to the “Advanced” section, and click on “Apache Handlers.” This will take you to the Apache Handlers management page, where you can add, delete, or modify handlers as needed.

How to Add Apache Handlers in cPanel

Follow these steps to add apache handlers in cPanel:

1. Access your cPanel account by logging in.

2. Navigate to “Advanced” and select “Apache Handlers.”

3. A form-like interface will appear.

4. When you see “Create an Apache Handler,” do the following:

a) In the “Handler” field, enter your desired handler name, such as “Apache-test1.”

b) In the “Extension(s)” field, input the extension you wish to use, like “test1pdf”.

5. Click the “Add” button to proceed.

6. A confirmation message will pop up, indicating that the handler “Apache-test1” is now linked to the extension “test1pdf”.

This process allows you to successfully set up an Apache Handler in cPanel.

How to Delete Apache Handlers in cPanel

1. Sign in to your cPanel control panel.

2. On the cPanel dashboard, find the Advanced section and select the Apache Handlers icon.

3. On the Apache Handlers page, look for the “Create an Apache Handler” section and locate the custom Apache handler you previously added. In the action column for this handler, click the “Delete” link to remove it.

4. Now, press the “Delete Handler” confirmation button to permanently remove the Apache handler.

Best Practices and Considerations For Apache Handlers in cPanel

  • Test Changes Carefully: Modifying Apache Handlers can have significant effects on your website’s functionality. Always test changes in a staging environment first.
  • Use Handlers Sparingly: Overuse of custom Apache Handlers can complicate server configuration and potentially affect performance. Use them only when necessary.
  • Understand Handler Types: Research and understand the handler types you’re adding to ensure they’re configured correctly for your needs.
  • Backup Before Changes: Always backup your website before making significant changes like modifying Apache Handlers to prevent data loss.


Apache Handlers offer powerful flexibility in managing how your web server processes different file types. By adding, deleting, and configuring Apache Handlers through cPanel, you can optimise your website’s performance and serve content exactly as intended. Remember to approach changes with caution, test configurations thoroughly, and leverage Apache Handlers to enhance your web server’s functionality effectively. Whether you’re running a small blog or a large e-commerce site, mastering Apache Handlers is a valuable skill in your web administration toolkit.


Q1. What are Apache Handlers in cPanel?

Apache Handlers in cPanel allow you to control how your server processes certain types of files. By specifying handlers, you can define what action Apache should take when it encounters files with specific extensions.

Q2. How to enable Apache in cPanel?

Apache is typically enabled and running by default on cPanel installations. If Apache is not running, you can restart it via the “Service Status” section under the “Server Status” category in cPanel, or use SSH to manually start Apache with the command `service httpd start`.

Q3. How to add a PHP handler in Apache?

To add a PHP handler in Apache, go to the “Apache Handlers” section in cPanel. Under “Create an Apache Handler,” enter the handler name (e.g., `application/x-httpd-php`) and the file extension (e.g., `.php`). Click “Add” to apply the new handler.

Q4. How to install Apache modules in cPanel?

To install Apache modules in cPanel, you need root access. Use the “EasyApache” feature in WHM (Web Host Manager), which is cPanel’s administrative interface. Select “EasyApache 4” or the version available, customise your profile by choosing the modules you want to install, and then provision the new configuration to apply changes.