Wordpress and PHP5-fpm

For a standard Wordpress installation you can use something like the following:

.htaccess for permalinks with php-fpm

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_URI} !^/fastcgiphp/*
RewriteCond %{REQUEST_URI} !fpm\.external
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress

If you are using multi-site/network blogs then you will need something like below:

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_URI} !fpm\.external
RewriteCond %{REQUEST_URI} !^/fastcgiphp/*
RewriteRule ^index\.php$ - [L]

# uploaded files
RewriteRule ^files/(.+) wp-includes/ms-files.php?file=$1 [L]

RewriteCond %{REQUEST_URI} fpm\.external [OR]
RewriteCond %{REQUEST_URI} ^/fastcgiphp/* [OR]
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule . index.php [L]
</IfModule>

# END WordPress
/var/customers/webs/cw01/wiki/data/pages/php/wordpress_and_php-fpm.txt · Last modified: 2012/07/25 20:03 by wadmin
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Noncommercial-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki