User Tools

Site Tools


Sidebar

js#vista.png msort nsort

php:wordpress_and_php-fpm

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
php/wordpress_and_php-fpm.txt · Last modified: 2020/02/24 11:16 (external edit)