Skip to main content

How to Check Whether a Required PHP Extension Is Installed

You can verify if a specific PHP extension is installed and enabled on your website's server. This process allows you to confirm that your website's software, such as WordPress or a custom application, has the necessary components to function correctly.

Before you begin

You will need:

  • Access to your website's file manager or an FTP client.

  • Access to the web browser on your computer.

Create a PHP Information Page

To see a list of all active PHP extensions and their current configurations, you can create a temporary information page.

  1. Use a file manager or FTP client to navigate to your website's root directory.

  2. Create a new file named info.php.

  3. Open the file and enter the following code:

    <?php
    phpinfo();
    ?>

  4. Save the file.

  5. Open your web browser and navigate to the file's URL (e.g., https://example.com/info.php).

Verify the Extension

  1. On the PHP information page, use the search function in your browser (typically Ctrl+F or Cmd+F).

  2. Type the name of the extension you are looking for (e.g., gd, mysqli, or imagick).

  3. If the extension is installed and active, it will appear as a table containing its version and configuration details.

  4. If the search returns no results, the extension is not currently enabled for your account.

Warning: The phpinfo() function reveals detailed information about your server environment. To prevent unauthorized users from viewing this information, delete the info.php file from your server immediately after you have finished your check.

Confirm the result

  • If the extension appears in the list, it is active and available for use by your website.

  • If the extension does not appear, you may need to contact Hostek support or check your hosting plan's features to see if the extension can be enabled.

How to Remove the Information Page

To ensure your server remains secure, remove the information page once you have confirmed your extension status.

  1. Use a file manager or FTP client to navigate to your website's root directory.

  2. Locate the info.php file.

  3. Delete the file.

Limitations

This method provides a comprehensive list of all active extensions. However, it does not indicate if a specific application (like a WordPress plugin) is correctly configured to use that extension; it only confirms that the extension is available to the server.

Did this answer your question?