It can be quite a challenge to find your and edit a PHP.INI on GoDaddy because php ini may not be where you think it should be and is not likely named what you think it is named.

1: Determine the PHP.INI Your Site Is Using:

  1. php-infoCreate a new text file named info.php then open it with a plain text editor like Notepad
  2. Copy / Paste this command  <?php phpinfo(); ?> into your info.php then save it
  3. FTP that info.php to your website (i.e. using FileZilla )
  4. Open that file with your browser (i.e. surf to www.YourSite.com/info.php

You can see that GoDaddy does NOT use PHP.INI or PHP5.INI as is often reported, but in my case was using PHP56.INI .  This makes sense because I am using PHP 5.6… but this certainly was not obvious until I saw it on the PHP info page.

2: How To Edit or Add a PHP.INI File To Your GoDaddy Hosted Site

Once you have the PHP.INI path and file name determined, you have two things to do:

  1. php-info-2If the path to your ini is something you can access from FTP software like FileZilla, then just edit it
    1. To have the new or updated php ini take effect, end all processes which you can do through the GoDaddy administration tool (either in cPanel or in “Hosting Details” under SYSTEM PROCESSES
  2. If the path to your ini is in something like /var/charoot/web/conf your site is using the default PHP INI from GoDaddy and that can not be changed – see the GODADDY DEFAULT PHP.INI section at the bottom of this article.
    1. This means you need to create a text file with the exact same name (in my case php56.ini )
    2. Make whatever changes you want
    3. FTP it to the root of your site
    4. To have the new or updated php ini take effect, end all processes which you can do through the GoDaddy administration tool (either in cPanel or in “Hosting Details” under SYSTEM PROCESSES
    5. Open the INFO.PHP file with your browser (i.e. surf to www.YourSite.com/info.php) again and see if it now points to your new php ini file

WARNING: After you are done, make sure you delete the info.php file from your site because it will provide hackers with lots of very dangerous information about your site.


GODADDY DEFAULT PHP.INI

After you have determined the path, you will have to use Putty or some other SSH tool to connect to your site, because GoDaddy hides its PHP.ini below the level you can reach with an FTP tool.

  1. godaddy-php-dot-iniLaunch Putty (or your other SSH tool) which you can download from HERE for free
  2. Enter the name of your site (the host name you use when you FTP to your site) in the HOST NAME field, and press your ENTER key.
  3. Sign in using your typical FTP credentials
  4. Type pwd in lower case and press the enter key – this will display the full path to your site on GoDaddy’s host – this is not needed but helpful
  5. Type cd and the path to the folder – in my case it is cd /var/charoot/web/conf

Unfortunately in my case that file was located in a read only location and even GoDaddy support refused to change it.


0 Comments

Leave a Reply

Avatar placeholder

Your email address will not be published. Required fields are marked *