{"id":15812,"date":"2026-06-18T17:49:35","date_gmt":"2026-06-18T16:49:35","guid":{"rendered":"https:\/\/da-manager.com\/blog\/how-to-enable-php-short-tags-on-your-hosting-account\/"},"modified":"2026-11-10T15:31:11","modified_gmt":"2026-11-10T14:31:11","slug":"how-to-enable-php-short-tags-on-your-hosting-account","status":"publish","type":"post","link":"https:\/\/da-manager.com\/blog\/how-to-enable-php-short-tags-on-your-hosting-account\/","title":{"rendered":"How to Enable PHP Short Tags on Your Hosting Account"},"content":{"rendered":"<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_87 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/da-manager.com\/blog\/how-to-enable-php-short-tags-on-your-hosting-account\/#What_Are_PHP_Short_Tags\" >What Are PHP Short Tags?<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/da-manager.com\/blog\/how-to-enable-php-short-tags-on-your-hosting-account\/#What_is_the_short_echo_tag\" >What is the short echo tag?<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/da-manager.com\/blog\/how-to-enable-php-short-tags-on-your-hosting-account\/#Why_Do_Some_Applications_Require_Short_Tags\" >Why Do Some Applications Require Short Tags?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/da-manager.com\/blog\/how-to-enable-php-short-tags-on-your-hosting-account\/#How_to_Check_Whether_PHP_Short_Tags_Are_Enabled\" >How to Check Whether PHP Short Tags Are Enabled<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/da-manager.com\/blog\/how-to-enable-php-short-tags-on-your-hosting-account\/#Option_1_Check_with_a_temporary_PHP_configuration_file\" >Option 1: Check with a temporary PHP configuration file<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/da-manager.com\/blog\/how-to-enable-php-short-tags-on-your-hosting-account\/#Option_2_Check_through_cPanel\" >Option 2: Check through cPanel<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/da-manager.com\/blog\/how-to-enable-php-short-tags-on-your-hosting-account\/#How_to_Enable_PHP_Short_Tags_on_Your_Hosting_Account\" >How to Enable PHP Short Tags on Your Hosting Account<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/da-manager.com\/blog\/how-to-enable-php-short-tags-on-your-hosting-account\/#Method_1_Use_cPanel_MultiPHP_INI_Editor\" >Method 1: Use cPanel MultiPHP INI Editor<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/da-manager.com\/blog\/how-to-enable-php-short-tags-on-your-hosting-account\/#Method_2_Configure_phpini\" >Method 2: Configure php.ini<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-10\" href=\"https:\/\/da-manager.com\/blog\/how-to-enable-php-short-tags-on-your-hosting-account\/#Method_3_Use_a_userini_file_with_CGI_or_FastCGI_PHP\" >Method 3: Use a .user.ini file with CGI or FastCGI PHP<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-11\" href=\"https:\/\/da-manager.com\/blog\/how-to-enable-php-short-tags-on-your-hosting-account\/#Method_4_Use_htaccess_where_the_PHP_handler_supports_it\" >Method 4: Use .htaccess where the PHP handler supports it<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-12\" href=\"https:\/\/da-manager.com\/blog\/how-to-enable-php-short-tags-on-your-hosting-account\/#Method_5_Use_Plesk_PHP_Settings\" >Method 5: Use Plesk PHP Settings<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-13\" href=\"https:\/\/da-manager.com\/blog\/how-to-enable-php-short-tags-on-your-hosting-account\/#Method_6_Ask_your_hosting_provider\" >Method 6: Ask your hosting provider<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-14\" href=\"https:\/\/da-manager.com\/blog\/how-to-enable-php-short-tags-on-your-hosting-account\/#Why_the_htaccess_Method_May_Not_Work\" >Why the .htaccess Method May Not Work<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-15\" href=\"https:\/\/da-manager.com\/blog\/how-to-enable-php-short-tags-on-your-hosting-account\/#Common_Problems_When_Enabling_PHP_Short_Tags\" >Common Problems When Enabling PHP Short Tags<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-16\" href=\"https:\/\/da-manager.com\/blog\/how-to-enable-php-short-tags-on-your-hosting-account\/#The_setting_still_shows_Off\" >The setting still shows Off<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-17\" href=\"https:\/\/da-manager.com\/blog\/how-to-enable-php-short-tags-on-your-hosting-account\/#The_website_displays_PHP_code_instead_of_running_it\" >The website displays PHP code instead of running it<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-18\" href=\"https:\/\/da-manager.com\/blog\/how-to-enable-php-short-tags-on-your-hosting-account\/#The_website_returns_a_500_error\" >The website returns a 500 error<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-19\" href=\"https:\/\/da-manager.com\/blog\/how-to-enable-php-short-tags-on-your-hosting-account\/#The_change_works_on_one_domain_but_not_another\" >The change works on one domain but not another<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-20\" href=\"https:\/\/da-manager.com\/blog\/how-to-enable-php-short-tags-on-your-hosting-account\/#The_setting_works_after_a_delay\" >The setting works after a delay<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-21\" href=\"https:\/\/da-manager.com\/blog\/how-to-enable-php-short-tags-on-your-hosting-account\/#Should_You_Enable_PHP_Short_Tags\" >Should You Enable PHP Short Tags?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-22\" href=\"https:\/\/da-manager.com\/blog\/how-to-enable-php-short-tags-on-your-hosting-account\/#Shared_Hosting_with_PHP_Configuration_Tools\" >Shared Hosting with PHP Configuration Tools<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-23\" href=\"https:\/\/da-manager.com\/blog\/how-to-enable-php-short-tags-on-your-hosting-account\/#Shared_Hosting_with_cPanel\" >Shared Hosting with cPanel<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-24\" href=\"https:\/\/da-manager.com\/blog\/how-to-enable-php-short-tags-on-your-hosting-account\/#Frequently_Asked_Questions\" >Frequently Asked Questions<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-25\" href=\"https:\/\/da-manager.com\/blog\/how-to-enable-php-short-tags-on-your-hosting-account\/#What_does_short_open_tag_do_in_PHP\" >What does short_open_tag do in PHP?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-26\" href=\"https:\/\/da-manager.com\/blog\/how-to-enable-php-short-tags-on-your-hosting-account\/#Does_short_open_tag_affect_the\" >Does short_open_tag affect the &lt;?= echo tag?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-27\" href=\"https:\/\/da-manager.com\/blog\/how-to-enable-php-short-tags-on-your-hosting-account\/#Can_I_enable_PHP_short_tags_in_cPanel\" >Can I enable PHP short tags in cPanel?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-28\" href=\"https:\/\/da-manager.com\/blog\/how-to-enable-php-short-tags-on-your-hosting-account\/#Can_I_enable_short_tags_using_htaccess\" >Can I enable short tags using .htaccess?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-29\" href=\"https:\/\/da-manager.com\/blog\/how-to-enable-php-short-tags-on-your-hosting-account\/#Is_it_safe_to_enable_PHP_short_tags\" >Is it safe to enable PHP short tags?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-30\" href=\"https:\/\/da-manager.com\/blog\/how-to-enable-php-short-tags-on-your-hosting-account\/#How_do_I_disable_PHP_short_tags_again\" >How do I disable PHP short tags again?<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-31\" href=\"https:\/\/da-manager.com\/blog\/how-to-enable-php-short-tags-on-your-hosting-account\/#Conclusion\" >Conclusion<\/a><\/li><\/ul><\/nav><\/div>\n<p>PHP short tags are an abbreviated way of opening PHP code inside a file. They are sometimes used by older PHP applications and templates, but they are not enabled in every hosting environment. If a legacy script relies on the short opening tag, <code>&lt;?<\/code>, it may display PHP code as text or fail to run when the server does not recognise that syntax.<\/p>\n<p>This guide explains what PHP short tags are, how they differ from the echo shorthand, and how to check and change the <code>short_open_tag<\/code> setting on a supported hosting account. It covers cPanel, <code>php.ini<\/code>, <code>.user.ini<\/code>, Apache configuration and Plesk, with notes about PHP handlers and common errors.<\/p>\n<p><strong>Important:<\/strong> Enabling short tags is mainly a compatibility measure for older code. For new PHP development, use the full <code>&lt;?php<\/code> opening tag. The short echo form <code>&lt;?=<\/code> is available independently of the <code>short_open_tag<\/code> setting.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"What_Are_PHP_Short_Tags\"><\/span>What Are PHP Short Tags?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>PHP code is normally enclosed between an opening tag and a closing tag:<\/p>\n<pre><code>&lt;?php\necho \"Hello, world!\";\n?&gt;<\/code><\/pre>\n<p>The short opening tag uses <code>&lt;?<\/code> instead of <code>&lt;?php<\/code>:<\/p>\n<pre><code>&lt;?\necho \"Hello, world!\";\n?&gt;<\/code><\/pre>\n<p>The PHP configuration directive <code>short_open_tag<\/code> determines whether PHP recognises this abbreviated opening form. It is a per-directory configuration setting, but the methods available to change it depend on the server API and hosting setup.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"What_is_the_short_echo_tag\"><\/span>What is the short echo tag?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>The short echo tag, <code>&lt;?=<\/code>, is shorthand for outputting an expression:<\/p>\n<pre><code>&lt;?= htmlspecialchars($name, ENT_QUOTES, 'UTF-8') ?&gt;<\/code><\/pre>\n<p>This is equivalent to:<\/p>\n<pre><code>&lt;?php echo htmlspecialchars($name, ENT_QUOTES, 'UTF-8'); ?&gt;<\/code><\/pre>\n<p>The <code>&lt;?=<\/code> form has been available regardless of the <code>short_open_tag<\/code> setting since PHP 5.4. Turning on <code>short_open_tag<\/code> is therefore not necessary just to use the short echo syntax.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Why_Do_Some_Applications_Require_Short_Tags\"><\/span>Why Do Some Applications Require Short Tags?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Some older scripts, templates and content management systems were written using <code>&lt;?<\/code> as their PHP opening tag. If the server does not recognise that form, PHP may not parse the code as expected. Enabling the directive can help maintain compatibility while you plan an upgrade or code refactor.<\/p>\n<p>There is also a potential conflict with XML declarations. An XML declaration begins with <code>&lt;?xml<\/code>. If short tags are enabled and that declaration appears in a PHP-parsed file outside a PHP string or output statement, PHP may interpret it as the start of PHP code and report a parse error. This is one reason to prefer the full PHP opening tag in new projects and to test legacy applications carefully.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"How_to_Check_Whether_PHP_Short_Tags_Are_Enabled\"><\/span>How to Check Whether PHP Short Tags Are Enabled<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Check the active setting before changing anything. The configuration displayed by a control panel or a command-line PHP installation may differ from the setting used by the website, so verify the web PHP environment for the affected domain.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Option_1_Check_with_a_temporary_PHP_configuration_file\"><\/span>Option 1: Check with a temporary PHP configuration file<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Create a temporary file in the website&#8217;s document root, for example <code>check-php-setting.php<\/code>, containing:<\/p>\n<pre><code>&lt;?php\necho 'short_open_tag: ';\nvar_export(ini_get('short_open_tag'));\n?&gt;<\/code><\/pre>\n<p>Open the file through the website&#8217;s HTTPS URL. The result should show whether the setting is enabled for that request. Delete the file immediately after checking it. Do not leave diagnostic scripts accessible on a live website.<\/p>\n<p>You can also use <code>phpinfo()<\/code> to inspect the PHP configuration, but it reveals considerably more server information. If you use it, restrict access and remove the file as soon as you have finished.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Option_2_Check_through_cPanel\"><\/span>Option 2: Check through cPanel<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>If your hosting account uses cPanel, open <strong>Software \u2192 MultiPHP INI Editor<\/strong>, select the relevant domain and review the available directives. If <code>short_open_tag<\/code> is listed, check its current value. The exact controls available depend on the PHP version and server configuration.<\/p>\n<p>Do not assume that a setting shown for the account&#8217;s home directory is necessarily the setting used by every domain. Select the correct domain when the interface offers domain-specific configuration. If you also need to change the PHP release assigned to a domain, see our guide to <a href=\"https:\/\/da-manager.com\/blog\/how-to-change-php-version-in-cpanel\/\">changing PHP versions in cPanel<\/a>.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"How_to_Enable_PHP_Short_Tags_on_Your_Hosting_Account\"><\/span>How to Enable PHP Short Tags on Your Hosting Account<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Use the method supported by your hosting provider and PHP handler. Make a backup of existing configuration files before editing them. The directive is called <code>short_open_tag<\/code>, and the intended value is <code>On<\/code>.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Method_1_Use_cPanel_MultiPHP_INI_Editor\"><\/span>Method 1: Use cPanel MultiPHP INI Editor<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<ol>\n<li>Sign in to cPanel.<\/li>\n<li>Open <strong>Software \u2192 MultiPHP INI Editor<\/strong>.<\/li>\n<li>Select the domain you want to configure.<\/li>\n<li>Look for <code>short_open_tag<\/code> in Basic Mode. If it is not listed, check whether Editor Mode allows the directive for your PHP version.<\/li>\n<li>Set the directive to <code>On<\/code>, then apply or save the change.<\/li>\n<li>Recheck the active value using the temporary PHP script described above.<\/li>\n<\/ol>\n<p>cPanel explains that MultiPHP INI Editor can save supported settings to the relevant PHP configuration files, which may include <code>php.ini<\/code>, <code>.user.ini<\/code> or <code>.htaccess<\/code>, depending on the server setup. The interface does not guarantee that every directive is supported in every environment. Read the <a href=\"https:\/\/docs.cpanel.net\/cpanel\/software\/multiphp-ini-editor-for-cpanel\/\" target=\"_blank\" rel=\"noopener\">cPanel MultiPHP INI Editor documentation<\/a> for the options available on your server.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Method_2_Configure_phpini\"><\/span>Method 2: Configure php.ini<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>If your hosting provider permits per-account or per-domain <code>php.ini<\/code> configuration, open the appropriate file in the domain&#8217;s configuration directory. Add or update this directive:<\/p>\n<pre><code>short_open_tag = On<\/code><\/pre>\n<p>Save the file and follow your host&#8217;s instructions for applying PHP configuration changes. On managed or shared hosting, you may not have permission to restart PHP services, and a restart may not be required. If the value does not change, confirm which configuration file the website&#8217;s PHP process actually loads.<\/p>\n<p>For a deeper explanation of how PHP reads configuration files, see the <a href=\"https:\/\/www.php.net\/manual\/en\/configuration.file.php\" target=\"_blank\" rel=\"noopener\">PHP configuration file documentation<\/a>.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Method_3_Use_a_userini_file_with_CGI_or_FastCGI_PHP\"><\/span>Method 3: Use a .user.ini file with CGI or FastCGI PHP<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>PHP supports per-directory <code>.user.ini<\/code> files when PHP runs through CGI or FastCGI. In the relevant directory, create or edit a file named <code>.user.ini<\/code> and add:<\/p>\n<pre><code>short_open_tag = On<\/code><\/pre>\n<p>Save the file and allow for the configured user-INI cache interval before testing again. The default cache interval is commonly five minutes, but the server administrator can change it. This method does not apply to every PHP handler; PHP&#8217;s documentation specifies that .user.ini processing is for CGI\/FastCGI SAPIs. See the <a href=\"https:\/\/www.php.net\/manual\/en\/configuration.file.per-user.php\" target=\"_blank\" rel=\"noopener\">PHP .user.ini guide<\/a>.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Method_4_Use_htaccess_where_the_PHP_handler_supports_it\"><\/span>Method 4: Use .htaccess where the PHP handler supports it<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>On an Apache server running PHP as an Apache module, a per-directory PHP setting may be accepted in <code>.htaccess<\/code> when the server configuration permits the relevant override. A typical directive is:<\/p>\n<pre><code>php_value short_open_tag On<\/code><\/pre>\n<p>This is not a universal solution. It may cause an HTTP 500 error when used with PHP-FPM, FastCGI or a configuration that does not allow PHP values in .htaccess. Some hosting configurations use handler-specific sections or a control panel to manage PHP values. If you are unsure which handler is active, do not add this line blindly. Ask your hosting provider which method is supported.<\/p>\n<p>For more background, read our guide to <a href=\"https:\/\/da-manager.com\/blog\/what-is-an-htaccess-file-and-what-can-it-do\/\">what an .htaccess file does and how to use it<\/a>.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Method_5_Use_Plesk_PHP_Settings\"><\/span>Method 5: Use Plesk PHP Settings<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>On a Plesk server, open <strong>Websites &amp; Domains<\/strong>, select the domain and open <strong>PHP Settings<\/strong>. If the hosting provider exposes the <code>short_open_tag<\/code> directive, change it to <code>On<\/code> and apply the settings. Some providers restrict which PHP directives customers can change, so the option may not be available.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Method_6_Ask_your_hosting_provider\"><\/span>Method 6: Ask your hosting provider<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>If the directive is not available in your control panel, or your configuration changes have no effect, contact your hosting provider. Tell support:<\/p>\n<ul>\n<li>The domain and directory affected.<\/li>\n<li>The PHP version selected for that domain.<\/li>\n<li>The PHP handler, if known (for example, PHP-FPM or FastCGI).<\/li>\n<li>That the legacy application requires <code>short_open_tag<\/code>.<\/li>\n<li>Which configuration method you have already tried and what result you received.<\/li>\n<\/ul>\n<p>Your provider can confirm whether the setting is permitted and apply it at the correct level if necessary.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Why_the_htaccess_Method_May_Not_Work\"><\/span>Why the .htaccess Method May Not Work<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>The <code>php_value<\/code> directive is associated with Apache&#8217;s PHP module configuration. It is not accepted in every PHP execution mode. For example, a PHP-FPM or FastCGI setup may ignore or reject it in .htaccess. Depending on the configuration, the result may be an internal server error rather than a successful change.<\/p>\n<p>If your website starts returning a 500 error immediately after adding the directive, remove the new line or restore your backup using File Manager or FTP. Then use the control panel or the configuration method recommended by your host. See our guide to <a href=\"https:\/\/da-manager.com\/blog\/how-to-fix-a-500-internal-server-error-on-your-hosting\/\">fixing a 500 Internal Server Error<\/a> if the problem persists.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Common_Problems_When_Enabling_PHP_Short_Tags\"><\/span>Common Problems When Enabling PHP Short Tags<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<h3><span class=\"ez-toc-section\" id=\"The_setting_still_shows_Off\"><\/span>The setting still shows Off<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>You may have edited a configuration file that is not loaded by the website, selected the wrong domain, or used a method unsupported by the active PHP handler. Check the loaded configuration through the web PHP process and ask your provider to confirm the applicable configuration path. For command-line checks, see <a href=\"https:\/\/da-manager.com\/blog\/how-to-use-the-cpanel-terminal\/\">how to use the cPanel Terminal<\/a>, keeping in mind that CLI PHP settings may differ from the website&#8217;s PHP configuration.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"The_website_displays_PHP_code_instead_of_running_it\"><\/span>The website displays PHP code instead of running it<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Confirm that the file is being processed by PHP and that the application is using the correct opening tag. Do not leave a diagnostic or source file publicly accessible. If the script relies on <code>&lt;?<\/code>, check the active <code>short_open_tag<\/code> value.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"The_website_returns_a_500_error\"><\/span>The website returns a 500 error<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>An unsupported <code>php_value<\/code> directive or another invalid configuration line may be responsible. Restore the previous file, then use the PHP configuration interface supported by the host. Check the server error log for the exact cause. You can also follow our guide to <a href=\"https:\/\/da-manager.com\/blog\/how-to-enable-error-reporting-in-php-on-your-hosting\/\">enabling PHP error reporting on your hosting account<\/a> when you need more diagnostic information.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"The_change_works_on_one_domain_but_not_another\"><\/span>The change works on one domain but not another<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>PHP settings can be configured per domain or directory. Check the PHP version and configuration for each domain separately, and confirm that the files are in the correct document root.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"The_setting_works_after_a_delay\"><\/span>The setting works after a delay<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Some PHP configurations cache per-directory settings. If you use <code>.user.ini<\/code>, allow for the configured cache interval before testing again. Do not repeatedly change the directive while waiting for the cache to refresh.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Should_You_Enable_PHP_Short_Tags\"><\/span>Should You Enable PHP Short Tags?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Enable the setting only when an application you need to maintain genuinely depends on the plain <code>&lt;?<\/code> opening tag. If you control the source code, replacing those tags with <code>&lt;?php<\/code> is generally the more portable long-term solution.<\/p>\n<p>Do not enable the setting solely to use <code>&lt;?=<\/code>, because that shorthand works independently of <code>short_open_tag<\/code>. Before changing a live site, back up its files, test on a staging copy where possible and check any XML output or templates that may contain XML declarations.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Shared_Hosting_with_PHP_Configuration_Tools\"><\/span>Shared Hosting with PHP Configuration Tools<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>If you manage PHP applications on shared hosting, check whether the plan provides cPanel or another control panel with per-domain PHP configuration. The availability of individual directives still depends on the PHP version, handler and server policy, so confirm support before relying on a particular setting.<\/p>\n<div class=\"damanager-product-card\">\n  <a href=\"https:\/\/my.da-manager.com\/store\/shared-hosting\" target=\"_blank\" rel=\"noopener\"><br \/>\n    <img decoding=\"async\" src=\"https:\/\/da-manager.com\/blog\/wp-content\/uploads\/2026\/05\/Da-Manager-Shared-Hosting-1-1.png\" alt=\"Shared hosting plans with cPanel and PHP website support\" loading=\"lazy\" \/><br \/>\n  <\/a><\/p>\n<h3><span class=\"ez-toc-section\" id=\"Shared_Hosting_with_cPanel\"><\/span><a href=\"https:\/\/my.da-manager.com\/store\/shared-hosting\" target=\"_blank\" rel=\"noopener\">Shared Hosting with cPanel<\/a><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Explore shared hosting plans that include cPanel, PHP website support, databases, SSL and backup features.<\/p>\n<p><a href=\"https:\/\/my.da-manager.com\/store\/shared-hosting\" target=\"_blank\" rel=\"noopener\">Explore Shared Hosting<\/a><\/p>\n<\/div>\n<h2><span class=\"ez-toc-section\" id=\"Frequently_Asked_Questions\"><\/span>Frequently Asked Questions<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<h3><span class=\"ez-toc-section\" id=\"What_does_short_open_tag_do_in_PHP\"><\/span>What does short_open_tag do in PHP?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>It controls whether PHP recognises the abbreviated opening tag <code>&lt;?<\/code> as the start of a PHP code block.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Does_short_open_tag_affect_the\"><\/span>Does short_open_tag affect the &lt;?= echo tag?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>No. The short echo tag <code>&lt;?=<\/code> is available regardless of the <code>short_open_tag<\/code> setting in PHP 5.4 and later.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Can_I_enable_PHP_short_tags_in_cPanel\"><\/span>Can I enable PHP short tags in cPanel?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>You may be able to enable the directive through MultiPHP INI Editor. Availability depends on the PHP version and the hosting provider&#8217;s server configuration.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Can_I_enable_short_tags_using_htaccess\"><\/span>Can I enable short tags using .htaccess?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Only on compatible Apache\/PHP configurations that permit the directive. It is not a reliable method for every PHP-FPM or FastCGI setup.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Is_it_safe_to_enable_PHP_short_tags\"><\/span>Is it safe to enable PHP short tags?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>The directive is primarily a compatibility setting, but short tags can conflict with XML declarations in PHP-parsed files. Use it only when required by legacy code and test the application carefully.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"How_do_I_disable_PHP_short_tags_again\"><\/span>How do I disable PHP short tags again?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Set <code>short_open_tag = Off<\/code> using the same supported configuration method, then verify the value through the website&#8217;s PHP environment. Check that the application no longer relies on plain short opening tags before disabling it.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Conclusion\"><\/span>Conclusion<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>PHP short tags can help older applications continue to run, but the correct way to enable them depends on your PHP handler and hosting configuration. Start by checking the active setting, then use cPanel MultiPHP INI Editor, <code>php.ini<\/code>, <code>.user.ini<\/code>, Plesk or a provider-supported Apache configuration method.<\/p>\n<p>For new development, use the full <code>&lt;?php<\/code> opening tag and reserve short-tag activation for compatibility situations where it is genuinely necessary. Always back up configuration files, verify changes through the web PHP process and remove diagnostic scripts after testing.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Learn what PHP short tags are, how to enable the short_open_tag setting on supported hosting accounts, and how to verify and troubleshoot PHP configuration changes.<\/p>\n","protected":false},"author":16,"featured_media":16454,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_mbp_gutenberg_autopost":false,"footnotes":""},"categories":[147],"tags":[333,3989],"class_list":["post-15812","post","type-post","status-publish","format-standard","has-post-thumbnail","category-general","tag-cpanel","tag-php"],"jetpack_featured_media_url":"https:\/\/da-manager.com\/blog\/wp-content\/uploads\/2026\/11\/enable-php-short-tags-hosting-guide.png","_links":{"self":[{"href":"https:\/\/da-manager.com\/blog\/wp-json\/wp\/v2\/posts\/15812","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/da-manager.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/da-manager.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/da-manager.com\/blog\/wp-json\/wp\/v2\/users\/16"}],"replies":[{"embeddable":true,"href":"https:\/\/da-manager.com\/blog\/wp-json\/wp\/v2\/comments?post=15812"}],"version-history":[{"count":2,"href":"https:\/\/da-manager.com\/blog\/wp-json\/wp\/v2\/posts\/15812\/revisions"}],"predecessor-version":[{"id":16456,"href":"https:\/\/da-manager.com\/blog\/wp-json\/wp\/v2\/posts\/15812\/revisions\/16456"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/da-manager.com\/blog\/wp-json\/wp\/v2\/media\/16454"}],"wp:attachment":[{"href":"https:\/\/da-manager.com\/blog\/wp-json\/wp\/v2\/media?parent=15812"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/da-manager.com\/blog\/wp-json\/wp\/v2\/categories?post=15812"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/da-manager.com\/blog\/wp-json\/wp\/v2\/tags?post=15812"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}