How can I have nginx serve WordPress at /blog?

Here’s what mostly works: Have an nginx config file for the subdomain setup, and ensure that http://wordpress.example.com works. In the nginx default config, have a location block for /blog that proxies to the subdomain: location /blog { rewrite ^/blog(/?.*)$ $1 break; # remove “/blog” proxy_set_header Host wordpress.example.com; proxy_set_header X-Real-IP $remote_addr; proxy_pass http://wordpress.example.com; } In wp-config.php, … Read more

Server Move: All pages leading home

Your proxy is rewriting everything to index.php, which means that the backend never sees the original URI. The proxy should be transparent, like this: server { listen 80; server_name example.com; location / { proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $remote_addr; proxy_set_header Host $host; proxy_pass http://127.0.0.1:8080; } }

Moving from http to https, and www. to non-www URL

Add the following to your .htaccess.. # force https on the front of the site RewriteEngine On RewriteCond %{HTTPS} !=on RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] ref https://stackoverflow.com/questions/4398951/force-ssl-https-using-htaccess-and-mod-rewrite if on nginx the advice is for the following.. server { listen 80; server_name yoursite.com www.yoursite.com; return 301 https://yoursite.com$request_uri; } refer to http://www.wpbeginner.com/wp-tutorials/how-to-add-ssl-and-https-in-wordpress/ for other areas such as the … Read more

Nginx 404, 500 errors and WordPress

Warning Before you get started, I highly recommend you to create a child theme to safely modify the current theme you’re using. That way, if you need to update your theme, your changes won’t be overwritten. Modifying your current error page If your theme already has a custom error page, look for a 404.php file … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)