WinNMP – Error establishing a database connection

So there is automatic way of creating projects. Avoid that. Do everything by yourself since there are constant database issues. These issues are beyond repair. It is easier to reinstall the whole thing and import all your backups, than try to figure out how to solve it.
Personally, I don’t have time to ask for support. But I do have time to do things manually, which is, in most scenarios 1 minute longer than automatic way.

So, if you like WinNMP as much as I do, but you don’t want MySQL getting corrupted (Error establishing a database connection) or whatnot then follow next steps when creating new projects:

  • Reinstall WinNMP
  • create new folder in c/winnmp/www/
  • open adminer and create new database
  • copy – paste WordPress files to new folder
  • run WordPress installation
  • Done!

For permalinks to work do this:

– navigate to C:\WTServer\conf\nginx.conf. (or C:\WinNMP\conf\nginx.conf)
Add this to it after every WordPress installation:

location /nameofyourfolder {
try_files $uri $uri/ /nameofyourfolder/index.php?$args;

Please replace the ‘nameofyourfolder’ with your folder name where’s your WordPress installation placed. You should add this for every WordPress installation if you want it to work with Permalinks enabled.
In case you are asking yourself for the exact location on where to put this code inside “nginx.conf” file, well just put it at the end, like this for example:


For all other things, errors and configurations check my other post:

WinNMP configuration for WordPress

More from author


Please enter your comment!
Please enter your name here

Related posts

Latest posts

Winamp is the best music player for Windows PC

Winamp, it really whips the llama's ass! 🙂 The best music player of all time.Old school people should know why. My first music player is...

Preload, DNS Prefetch, Preconnect

Find out what does Preload, DNS Prefetch an Preconnect functions are, how they differ from each other and where to use them.

All in One SEO Pack Pro vs Yoast SEO Pro

The ultimate comparison: All in One SEO pack Pro vs Yoast SEO Pro. Find out which one is the best in the year 2020.