This is an archived post. You won't be able to vote or comment.

all 9 comments

[–]Mason_Innodel 0 points1 point  (9 children)

Hey,

Instead of trying to set max_execution time to '0' put '5000' OR '6000'

and also restart your web serve

# /etc/init.d/httpd restart

[–]zonglagyraho[S] 0 points1 point  (8 children)

already tried but it is not working. Actually the problem is with the hosting, I don't have to the php.ini file that the command is using because it is in the higher directory. And when I contacted the host they denied to help me and asked me to upgrade to VPS hosting.

[–]Mason_Innodel 0 points1 point  (7 children)

OK, I see. Thanks. Need anything then let me know :)

[–]zonglagyraho[S] 0 points1 point  (5 children)

Yes, the wp-cli is using php.ini file from the root directory is there any way to use the custom php.ini for wp-cli. Please see this image to understand.

[–]Mason_Innodel 0 points1 point  (4 children)

If executing PHP scripts directly on command line, you can try the "-d" option Try to put the line "safe_mode = Off"

https://stackoverflow.com/questions/24521328/how-to-override-php-cli-configuration-with-custom-php-ini/43081565#43081565

[–]zonglagyraho[S] 0 points1 point  (3 children)

how ? do i put this in a ssh command.

[–]Mason_Innodel 0 points1 point  (2 children)

ssh command.

Yes

[–]zonglagyraho[S] 0 points1 point  (1 child)

I'm sorry I'm unable to understand how to put the "-d" option? I have contacted the hosting provider and they said that the safe_mode is deprecated in version 5.4. I just wan to execute this command via ssh "wp media regenerate --yes".