GoDaddy Wordpress Max execution time problem

If you've hosted your site on GoDaddy, Windows Hosting and are using WordPress, sooner or later you will face the max execution time out problem. I faced this problem for quite some time and looked aroung google, hitting my head. If you've faced the same series of problems as below:

1. You are hosted on GoDaddy thinking they are awesome, but you find out wordpress throws execution time errors
2. you contacted support. they clearly give you either a cold shoulder or ask you to write a custom php.ini/php5.ini.
3. you dont know what to do and your boss is on your head.
4. you try to get hold of GoDaddy's ini file, you cannot!
5. Finally, you decide to write your own PHP.ini file but are either afraid of breaking something or just do not know where to start,

this post is for you>

1. open up your text editor. I recommend notepad++. create the following file:
info.php
<?php phpinfo(); ?>

2. upload info.php to the root of your hosting. Now browse to http://yourhost/info.php. Whatever loads up on the screen is the PHP config. Look for Loaded Configuration File and note down its value. IN my case it is C:\PHP5\php.ini. We need all this information in our custom PHP5.ini file but its too much info to copy and format, so we will copy GoDaddy's default file and edit it as necessary.

3. fire your text editor and create the following file:
getconfig.php
<?php copy('C:\PHP5\php.ini'*, 'PHP5.ini'); echo('finally'); ?>

* = replace with whatever path shows up in Loaded Configuration File

4. Open up GoDaddy Hosting Manager (yes via their website). Launch the File Manager
5. On your hosting root create a folder "baddaddy".
6. select newly created folder "baddaddy" and click permissions. **Make it web writable.**
7. copy file getconfig.php to badaddy and now browse to http://yourhost/baddaddy/getconfig.php.

8. Once you see "finally" written on screen, go back to the filemanager in GoDaddy Control Panel, goto baddaddy folder and you will see a new file PHP5.ini appear there. Download this file. This is a copy of GoDaddy Settings.

9. Make whatever changes you need to(just know what you're changing, I am not a PHP expert, so I cannot be responsible if you screw up something). For my problem, I changed the max_execution_time = 30 to max_execution_time = 1200.

10. Upload the edited file to the root of your application and back in the GoDaddy Control Panel, IIS Management, hit Recycle App Pool, and then ***WAIT FOR A WHILE (20 minutes)***

11. browse back to http://yourhost/info.php to confirm the new settings are in place

IMPORTANT ****
IF you see a "500: Internal Server Error" on your GoDaddy WordPress Blog after doing all this,
12. Change the log_errors from log_errors = On to log_errors = Off in the PHP5.ini you just edited and re-upload, recycle app pool and wait. The 500 error pop up if the log file cannot be found.

I AM NO PHP EXPERT but this thing worked for me, the blog still loads slow but I have not seen any "Fatal Error: 30 second timeout" since then.

Better yet, get a new host!

Hope this helps.

Thanks to this and this post

PS: The "baddaddy" folder name is just to let GoDaddy know how frustrated we get when we have to face such problems.

Update: I realized that after doing this my website was down again with a 500 after a week, so I checked the PHP5.ini file and realized that there are two places where log_errors = On appears. So ensure that both are fixed. I don't know if this is default in the Godaddy file or has my PHP conf been edited by the sysadmins sometime later. I will wait for some more time and push an update to see if GoDaddy admins are changing anything on my file.

Comments

Popular Posts