Month: April 2013

Setting a PHP configuration value via htaccess

An Apache .htaccess file can be used to set specific configuration values for PHP in a website. This is a useful feature when looking for a temporary PHP setting specific to that website; for example when doing an upgrade.

To set a value use: _php_value _. Setting a boolean value is done using php_flag Off|On. An unlimited execution time can be set for example by placing php_value_time_limit 0 in the .htaccess file.

Overriding a PHP setting via .htaccess is not always allowed in the site configuration. To allow this the Options option must be added to the AllowOverride directive in the Virtualhost configuration of the site.

Leave a Comment

Easy WordPress update via SSH

Have you ever struggled with the automated update feature of WordPress, not being able to use it because it requires FTP? FTP is by design a “not really secure” protocol, so if it can be avoided, avoid it. There is a plugin called SSH SFTP Updater Support which enables updates via SSH/SCP.

When using it I encountered an issue with the php_time_limit being to short (30 seconds); so I temporarily set it to 0 (unlimited) via a .htaccess file.

Leave a Comment