PS:341 – GoDaddy Hosting.

Having been in the hosting space for the better part of two decades I’ve seen hosting companies rise and fall, rise and be bought out, and some just a whisper of what was.

GoDaddy is one of those companies that seems to be “Easy” for some, and insanely complicated for others in what should be an easy set of fixes.

I recently got pulled into a migration project from a design shop I work with, they had a client who is a die-hard GoDaddy fan, they have a “Windows” hosting package which leaves a lot to be desired. Sure they could probably talk to someone and upgrade, but honestly? They just wanted their new pretty site, and that’s it.

In the process of the migration I had PHP suddenly stop having MySQL support, and if you’ve ever used WordPress at all, you’ll know it is a big fan of MySQL access and if PHP doesn’t have the support it tends to complain a lot.

If anyone should come by this thread and you are having issues with GoDaddy’s Windows Hosting platform and can’t seem to get PHP working and you are a designer and at the mercy of a customer in getting this working here’s what worked for me:

web.config

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
 <system.webServer>
<httpProtocol>
  <customHeaders>
    <add name="Access-Control-Allow-Origin" value="*" />
  </customHeaders>
</httpProtocol>
  <rewrite>
   <rules>
    <rule name="wordpress" patternSyntax="Wildcard">
     <match url="*"/>
     <conditions>
      <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true"/>
      <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true"/>
     </conditions>
     <action type="Rewrite" url="index.php"/>
    </rule>
   </rules>
  </rewrite>
 </system.webServer>
</configuration>

php5.ini

[PHP]
memory_limit = 384M
post_max_size = 128M
upload_max_filesize = 128M
allow_url_fopen = Off
allow_url_include = Off
default_socket_timeout = 60
log_errors=On
extension_dir = C:\\php5\\ext
[mail function]
; For Win32 only.
SMTP = relay-hosting.secureserver.net
smtp_port = 25
[SQL]
sql.safe_mode = Off
[ODBC]
odbc.allow_persistent = On
odbc.check_persistent = On
odbc.max_persistent = -1
odbc.max_links = -1
odbc.defaultlrl = 4096
odbc.defaultbinmode = 1
[PHP_BZ2]
extension=php_bz2.dll
[PHP_CURL]
extension=php_curl.dll
[PHP_GD2]
extension=php_gd2.dll
[PHP_GETTEXT]
extension=php_gettext.dll
[PHP_MCRYPT]
extension=php_mcrypt.dll
[PHP_MYSQL]
extension=php_mysql.dll
[PHP_MYSQLI]
extension=php_mysqli.dll
[PHP_OPENSSL]
extension=php_openssl.dll
[PHP_PDO]
extension=php_pdo.dll
[PHP_PDO_MYSQL]
extension=php_pdo_mysql.dll
[PHP_SOAP]
extension=php_soap.dll
[PHP_SOCKETS]
extension=php_sockets.dll
[PHP_SQLITE]
extension=php_sqlite.dll
[PHP_XSL]
extension=php_xsl.dll
[PHP_ZIP]
extension=php_zip.dll
[PHP_MSSQL]
extension=php_mssql.dll

Put these both in your root folder, then under the control panel in IIS restart the application pool so it reloads everything no matter what and for me, this got me working again. Now bear in mind if they have you using a lower version of PHP (I was at 5.2.x build) then in time WP and other plugins may not have support, so may want to have your customer long-term contact support about moving to a newer build, or maybe get a small VPS/Linux Hosting package for WordPress for a bit more ease of staying up-to-date.

If you have the option to switch out, feel free to comment here, I can host a WordPress site no problem! But hopefully the above has you squared away.

%d bloggers like this: