Here’s a quick trick that allows automatic installation of WordPress on an HTTP server.
The normal process is: browse to
wordpress.com, grab the archive locally, upload to your server, unzip and run the installer. Sometimes, you even have to unzip locally and then upload the whole sets of files to the server.
The automatic process can be done using Instant Install.
Continue reading “Automatic WordPress installation”
On a NAMP (NetBSD, Apache, MySQL, PHP) server, you can get a faster PHP rendering using eAccelerator.
First of all, install the
Then, configure PHP to use it and the system to allow memory allocation:
# vi /usr/pkg/etc/php.ini
# sysctl -w kern.ipc.shmmax=536870912
# vi /etc/sysctl.conf
# /etc/rc.d/apache restart
According to ApacheBench, the initial “Time per request” was 3 sec. Using eAccelerator, it goes down to 1.9 sec.
Source: Optimize PHP
According to the Google robot, my actual configuration serves WordPress pages in about 1-2 seconds. I was looking on improving this a bit.
So I tried various OSes on various machines:
- A VIA Nehemiah @1GHz
- An Intel Atom N450 @1.66GHz
- An Intel Core2Duo T7300 @2.00GHz
- NetBSD 5.1
- OpenBSD 4.9
- Debian GNU/Linux 6
I tried using the same software with no particular optimization (other than the system’s defaults). All of them where using Apache2 (did an extra test with Apache1 on OpenBSD), PHP5 and MySQL. I dumped my production SQL and WWW data. Then browsed a bit with Safari and Firefox to get a “human feeling” on the user experience. Then ran a
ab -n 20 -c 5 "http://www.tumfatig.net/?orderby=rand" on those.
The conclusion is quite simple: You don’t really get speed improvement towards OSes. But the faster your CPU is, the faster Apache serves WordPress pages. The conclusion was a bit different on static HTML pages. Especially OpenBSD’s native Apache which was faster than lightning.
I am planning on benchmarking various OS and HTTP daemons to host my WordPress site. A well-known (free) tool to benchmark Web servers is ApacheBench. But it can only use a single URL for each benchmark session. A trick to achieve natural benchmarking on WordPress, or “simulate real users browsing as much as possible”, is to use a random generated content ; using the
?orderby=rand parameter. This will allow the Web server to be used as if several users were doing real things ; that is, reading various content:
# ab -n 20 -c 5 "http://www.tumfatig.net/?orderby=rand"
This is ApacheBench, Version 2.3 <$Revision: 655654 $>
Concurrency Level: 5
Time taken for tests: 31.190 seconds
Complete requests: 20
Requests per second: 0.64 [#/sec] (mean)
Time per request: 7797.489 [ms] (mean)
Time per request: 1559.498 [ms] (mean, across all concurrent requests)
Since my Web site was created, it ran various rendering software ; each of those generated URL that Google sometimes seems to remember. Many of those URL aren’t relevant nowadays ; although the information may still be there on the Web site.
Here’s how I deal with the “
404: Page not found” error on WordPress:
Continue reading “Pretty 404 pages on WordPress”