Your cart is currently empty!
WordPress Hosting Requirements
A Checklist
My minimum checklist currently looks like this. If a host doesn’t meet these requirements, then I would recommend to look for another one that does.
- Linux Server
- PHP 5.3.x
- MySQL 5.x
- Custom php.ini
- Custom .htaccess + mod_rewrite + mod_deflate
- SSH Access
- Cronjobs
WordPress Official Requirements
… are posted here
Basically, what is said there is that you need suitable versions of PHP and MySQL. At the time of writing this and for WordPress 3.2 (currently available as RC1) this means PHP version 5.2.4 or greater and MySQL version 5.0.15 or greater.
A bit more specific information about Hosting WordPress will make you aware of the need for Apache mod_rewrite.
But wait … is that really all you need to keep your hair on your head?
If your budget requires you to use shared hosting for your great WordPress site, there’s more you should take into account.
Support for custom php.ini files
Custom php.ini files(*) are used to set configuration options.
You should be able to place a php.ini where you need it and your web host should support that. This allows you to adjust for example to set your maximum upload file size, the maximum post size and the maximum script execution time. If you want to be able to upload really large files like huge pictures or long videos, then this is very convenient and necessary.
An example php.ini that allows you to upload files of up to 64M would look like this:
upload_max_filesize = 64M
post_max_size = 65M
max_execution_time = 240
This should be placed in your wp-admin directory if you want to be able to use it to upload large media to your site from the backend.
An alternative to setting runtime configuration options is using PHP’s ini_set() (**) although this does not support all options.
In our example we could only set max_execution_time but not upload_max_filesize or post_max_size because these must be set in php.ini, .htaccess or httpd.conf. Valid options for ini_set() are marked as PHP_INI_USER or PHP_INI_ALL under the “Changeable” column found in the List of php.ini directives.
upload_max_filesize PHP_INI_PERDIR post_max_size PHP_INI_PERDIR max_execution_time PHP_INI_ALL
Assuming Apache in a LAMP environment, access to these is important:
Support for .htaccess override
So you can have pretty permalinks and make other adjustments … using mod_rewrite and mod_deflate:
mod_rewrite
Besides satisfying WordPress’ own requirements to enable pretty permalinks, one might also need to do other useful stuff using mod_rewrite. A common case is redirecting old links after moving your site to WordPress.
mod_deflate
The mod_deflate module allows content to be compressed before being sent over the network. This basically reduces traffic and improves page load times when used properly.
To compress html, plain text, xml, javascript and css files you can add this to your .htaccess file placed in the root directory of your site.
<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/html text/plain text/xml text/javascript text/css
</IfModule>
Secure Shell (SSH) Access
For serious users and developers who appreciate the availability of a terminal and the power of a command line, SSH access is a must. Windows users enjoy Putty for this.
Trying to import a 25M database via phpMyAdmin when your web host limits the post size to 2M? Then you’re out of luck unless you have SSH access … or they really like you and adjust their settings.
Also, FTP is inherently insecure so you better sftp (Windows users try psftp) your files to your server.
cron – crontab – custom cronjobs
Many functions may rely on periodically scheduled tasks being executed, for example sending out a newsletter or purging superfluous data. Although WordPress offers a ‘fake’ or pseudo-cron (a good article on how it’s used) the real deal is to be able to add lines like this to your crontab:
*/10 * * * * wget -O - -q http://www.example.com/wp-cron.php?doing_wp_cron
which makes (almost) sure that wp-cron.php is run every 10 minutes.
If your web host does not offer you to add cron jobs, then you might want to think about changing your provider soon.
GD Image Library
If you want to be able to process images (e.g. resize images “on the fly”) then the GD image library should be enabled. Many plugins rely on this to create thumbnails, resized images, …
If you have SSH access to your server, you can check if it’s there using:
$ php -m | grep gd gd
Or you can check using this script:
<?php
if ( function_exists( "gd_info" ) ) {
echo 'GD is available';
} else {
echo 'GD is not available';
}
?>
Also, for image processing your memory limit should be high enough, set memory_limit in your php.ini:
memory_limit = 128M
or using ini_set() in your script:
<?php
ini_set( 'memory_limit', '128M' );
?>
A host with a good reputation
Ever tried to distribute a newsletter to thousands of customers only to find out that lots of them are rejected because your web hosting provider’s email servers are blacklisted? Annoying at least …
Make sure to check that your web hosting provider takes care of keeping their servers off blacklists. You can check your hosting network’s reputation using e.g. Senderbase.
Dedicated unique static IP
You need one if you want a SSL certificate but a dedicated IP also adds the advantage of isolating your site from other sites hosted on the same server. If someone causes a shared host’s IP address to get blacklisted, your site will suffer as well. But with a dedicated IP this is not so. If your dedicated IP is also static it means that it will not change over time which may add some (questionable) benefits as well.
Comments
3 responses to “WordPress Hosting Requirements”
Would be nice if you would recommend some hosting companies w/prices that permit these capabilities. I found out the hard way that namecheap.com restricts access to php.ini and other options.
Hi DDavis,
I publish your comment to share it with the community.
Kind regards,
Antonio B.
I’d favor FreeBSD [1] over Linux as it’s default install provides sophisticated security tools.
Also, if you want to boost your blog’s performance, consider replacing Apache with nginx [2].
By several configuration options like avoiding PHP-execution of non PHP-files it may serve your content faster. It’s said to be used by wordpress.org (unconfirmed by me atm).
[1] http://www.freebsd.org/about.html
[2] https://codex.wordpress.org/Nginx
Leave a Reply