
WinNMP - Nginx MariaDB Redis Php development stack for Windows
A lightweight, fast and stable server stack for developing php mysql applications on windows, based on the excellent webserver Nginx. A lighter alternative to XAMPP and WAMP.
How to install Wordpress on Windows:
1. Install WinNMP Stack
- Download the latest installer. The installer produces a portable folder.
2. Create a new Wordpress Project
- Open WinNMP Manager by clicking the taskbar or desktop icon, then click on
New Project
icon, choose a project name likeMyProject
, hit Enter or clickSave Project
. - Check
Enable Local Virtual Server
- Save the project settings.
3. Download Wordpress
- Download the Wordpress Archive
- Extract files to
WinNMP\WWW\MyProject
4. Setup Nginx
-
Edit
WinNMP\conf\domains.d\MyProject.conf
directly or in WinNMP Projects list >Project Setup
>Edit Nginx Virtual Server
button. -
Replace the
location / {
directive with:
## avoid processing of calls to non-existing static files
location ~* \.(js|css|png|jpg|jpeg|gif|swf|ico|pdf|mov|fla|zip|rar|7z|tar|tgz|gz|ttf|otf|eot|swg|woff|woff2)$ {
expires 1y;
try_files $uri =404;
}
location / {
fastcgi_read_timeout 80s;
fastcgi_intercept_errors off;
try_files $uri $uri/ /index.php?$args;
rewrite /wp-admin$ $scheme://$host$uri/ permanent;
# BEGIN W3TC Minify core
rewrite ^/wp-content/cache/minify.*/w3tc_rewrite_test$ /wp-content/plugins/w3-total-cache/pub/minify.php?w3tc_rewrite_test=1 last;
rewrite ^/wp-content/cache/minify/(.+/[X]+\.css)$ /wp-content/plugins/w3-total-cache/pub/minify.php?test_file=$1 last;
rewrite ^/wp-content/cache/minify/(.+\.(css|js))$ /wp-content/plugins/w3-total-cache/pub/minify.php?file=$1 last;
# END W3TC Minify core
}
location = /xmlrpc.php {
deny all;
}
# https://codex.wordpress.org/Installing_WordPress#Configure_nginx
5. Enable HTTPS using an SSL certificate
- Self Signed SSL certificates are usefull only for local development and are easy to set up. Follow this instructions to enable them.
- You can also use free SSL Certificates from LetsEncrypt but you need good network administration skills
6. Apply Changes to Nginx:
- Press Kill / Start Nginx
7. Wordpress Setup Wizard
- Browse to
http://MyProject.test
(ORhttps://MyProject.test
if you added an SSL certificate) and follow the instructionsMySql server: 'localhost' MySql user: 'root' or 'MyProject' MySql password: '' (no password) MySql database: 'MyProject'
8. Wordpress Command Line Utility wp-cli
- if you open a Command Prompt you can use the
wp
command to manage Wordpress trough the command line:cd MyProject wp help wp cache flush
Additional articles about installing Wordpress on Windows using WinNMP
- Install and run WordPress on Nginx locally - WinNMP (fan video)
- WinNMP / WTServer configuration for WordPress (old article - 2017 )