WordPress on Nginx - Missing admin/toolbar

Hi I've been trying to figure this out for quite some time now, but whatever I do nothing seem to work. I have a VPS setup running Nginx + Varnish with WordPress multisite. Everything works fine except the admin/toolbar when browsing the sites. It simply wont load. It loads in the admin area, but when viewing site it doesn't load. I have checked the "Show Toolbar when viewing site", and I have deactivated all plugins. Now I have even gone …
Category: Web

WordPress Multisite with NGINX, subfolders, and FROM a subfolder

Dear fellow WordPress enthusiasts, I am using WordPress multisite. The default blog works, with permalinks, but not the subblogs. I get a redirect loop when trying to access /wp-admin on a network site. I am using FastCGI with Facebook's HHVM; similar to plain vanilla FastCGI. I know I am missing server blocks to redirect files: I want, first and foremost, to understand why I'd get a redirect loop on sub-sites. Thank you for your help. My nginx configuration is as …
Category: Web

How to solve 404 permalink errors on nginx server

I can't solve this issue. I tried everything I found over the web. I first tried configuring my nginx.conf following the example on codex with no success. https://codex.wordpress.org/Nginx I found that many users encounter this issue but the most popular fix is this: location / { try_files $uri $uri/ /index.php?$args; } I still get 404 for all pages. This only happens if I don't use the Plain setting in permalinks structure. Any ideas on how can I fix this? Thank …
Category: Web

NGINX serve Wordpress from sub-path fails with 404, how to fix?

I'd like host review branches for staging, to test and get feedback before publishing to production. I tried to follow some documentation provided online such as the NGINX recipes ( https://www.nginx.com/resources/wiki/start/topics/recipes/wordpress/ ) without success! So, how to fix it? The pattern for the review branches are /review-xxxxx or /review-xx_x-xxx. As I have setup the Deployment pipeline to trigger publishing to AWS ECS for review-* branches and that's where I'd like to keep it private for tests and feedback only. I've …
Category: Web

I have cloudflare flexible enabled, How to redirect to https for Nginx server

If I access directly to https it works, but the site is still accessible by HTTP. How do I force all http to https? I have used WordPress HTTPS plugin. But it is not redirect to https. I have configured the nginx with following: server { listen xxx.x.xxx.xxx:80; listen 127.0.0.1:80; server_name mydomain.com; root /var/www/html/mydomian.com/; index index.html index.htm index.php; charset utf-8; location / { try_files $uri $uri/ /index.php?$args; rewrite ^(.*)$ https://$http_host$request_uri redirect; } ... But this redirection will leads to infinite …
Category: Web

Why is Google Search Console getting X-Robots-Tag noindex?

As can be safely inferred from the question, I'm trying to get Google to index my site. I'm using Wordpress 5.9 served by nginx (1.13.12), with SEOPress (5.6 up-to-date). I let the wizard guide me for the settings and created a sitemap that I registered with Google Search Console - as advised. I let Google do its work and came back later to check, and found that every page exposed in my sitemap returns a noindex meta (X-Robots-Tag with User-Agent …
Category: Web

Wordpress Pages Redirecting to Root with Wordpress Multisite (Sub-Directory)

I am working with Wordpress Multisite (with sub-directory structure). Everything works fine instead of Wordpress pages. When I publish a page and I try to visit it, it redirects to the main multisite. So for example, if the page is in this path: https://example.com/en-us/my-new-page/ it automatically redirects to: https://example.com/en-us/ Or another example, if the page is in this path: https://example.com/es-es/my-really-new-page/ it automatically redirects to: https://example.com/es-es/ I am using a plugin called Custom Permalinks to make posts URLs look nicer. I …
Category: Web

How can stop redirects 404 in wordpress

Currently, all 404 errors are being redirected to the page with the following uri: www.example.com/woops (previously above page was called : www.example.com/404-page however we changed the name from 404-page to woops) Please cancel all error 404 redirects to www.example.com/woops. Also, please cancel all error 404 redirects to www.example.com/404-page We will handle 404 erros from nginx server configuiration
Category: Web

413 Request Entity Too Large nginx/1.18.0 (Ubuntu)

This message occurs whenever I attempt to upload a file greater than 2M in wordpress. I have made the follow changes in order to increase the allowed file upload sizes: In nginx.conf, I added client_max_body_size 200M; In php.ini, I modified upload_max_filesize = 200M max_file_uploads = 20 Post_max_size = 256M In wp-config.php, I added @ini_set( 'upload_max_filesize' , '200M' ); @ini_set( 'post_max_size' , '256M' ); @ini_set( 'memory_limit' , 256M' ); Even with these parameters set in the three configuration files I am …
Category: Web

Cannot update WordPress to 5.2

I am using CentOS 7 (CentOS Linux release 7.6.1810 (Core)), NGINX 1.15.12, WordPress 5.1 Error Update WordPress Downloading update from https://downloads.wordpress.org/release/wordpress-5.2-no-content.zip… Unpacking the update… The update cannot be installed because we will be unable to copy some files. This is usually due to inconsistent file permissions.: wp-admin/includes/update-core.php Installation Failed My screenshoots
Category: Web

Last-Modified header is removed from server response!

i attached this code to all these hooks (init, template_redirect, wp_footer) to add the Last-Modified header to the server response, i also add some other header for testing. results: the TEST-TEST header was returend to the response BUT not the Last-Modified. i thought it was a conflict with some plugin, that for some reason is unsetting this header. So i moved this code to the footer.php and index.php in the project root. but the result is same. can anyone explain …
Category: Web

Moving wordpress to different url/server creates redirect loop

I'm trying to move my wordpress site in to different server and url. How ever i seem to have a persistent redirect loop problem. I think this is not a cache, cookie or plugin problem and I am suspecting incorrect/missing settings in .htaccess file might be the culprit. The server where i am doing the moving from, uses nginx web server and does not have .htaccess file. The hosting provider that i am trying to move into uses apache2 and …
Category: Web

Downloaded WP but Nginx home page still showing

I am trying to install a second WP site on an Ubuntu 16 server running Nginx. I have successfully installed WordPress according to my server results, but I still only get the Nginx home page. I thought it might be the fact that the Group Owner was the User, so I changed group owner on web files to www-data: microurb@vps148370:/var/www/dancortes.press/public_html$ ls -l total 192 -rw-r--r-- 1 microurb www-data 0 Oct 5 15:36 index.html -rw-rw-r-- 1 microurb www-data 418 Oct 8 …
Category: Web

issue with wordpress [wp-admin] redirects, when using kubernetes ingress hosting two wordpress websites using path

i'm trying to setup a kubernetes deployment for two wordpress websites in different pods, each will have it's own deployment and service, etc..., under the same ingress, i have setup the ingress this way : apiVersion: networking.k8s.io/v1 kind: Ingress metadata: annotations: cert-manager.io/cluster-issuer: letsencrypt nginx.ingress.kubernetes.io/rewrite-target: /$1 nginx.ingress.kubernetes.io/use-regex: "true" labels: app: app-1 built-by: kustomize name: app-1 namespace: namespace-1 spec: ingressClassName: nginx rules: - host: test.sub.website.com http: paths: - backend: service: name: wordpress-service-1 port: number: 80 path: /(.*) pathType: Prefix - host: test.sub.website.com …
Category: Web

Permalinks keep reverting to 404 unless I re-save them

I'm running the latest (and constantly updated) version of WordPress on Nginx. Every now and then I wake up to a site full of 404 errors. The fix is to go into the permalinks and just save the settings on that page. This typically fixes the issue for a day or so. This was happening to another site of mine on the same server. It suddenly stopped being an issue. My point here is that not only do I not …
Category: Web

Setup another new subdomain root on top of multisite configuration

I already set up a multisite installation using NGINX configuration below, runs perfectly, but I want to setup another subdomain like dashboard.domain.my on top of this configuration below. I already tried to create a new config file of dashboard.domain.my.conf that points to another document root /var/www/dashboard.domain.my but it redirect me to existing wordpress multisite root /var/www/domain.my/wordpress instead of specified root /var/www/dashboard.domain.my. Any idea on where I should look to make sure this one subdomain I want is separated from the …
Category: Web

Do I need a DNS on a home network?

Having installed a LEMP stack (nginx) on Ubuntu 20.04 I can run a fresh Wordpress site in Firefox using the IP address 127.0.0.1 with no problems. Using 'localhost' doesn't work. From another Ubuntu 20.04 in my home network I use the IP address 192.168.0.213 and get just a bare-bones view of the Wordpress site. The HTML shows me that all the links in this case contain the hostname 127.0.0.1 like in my first case. Do I need to have a …
Category: Web

WordPress and NGINX - permalinks are not working with ending slash

I have added this line in the nginx configuration file try_files $uri $uri/ /index.php?$args; rewrite ^([^.]*[^/])$ $1/ permanent; #adding slash and the permalinks are working fine, but when adding / (please see rewrite rule how i'm adding it) NGINX gives me 404 error. For example somedomain.com/post/ThisIsPermaLink (working) after adding slash somedomain.com/post/ThisIsPermaLink/ (gives 404 error) But all this two versions are working on Apache environment. Apache is redirecting all requests without slashes (somedomain.com/post/ThisIsPermaLink) to somedomain.com/post/ThisIsPermaLink/ So i need same functionality with …
Category: Web

wp-admin remove part of the url

This looks like wp-admin remove the subfolder URL but it's not the same problem, because the subfolder part is not a subfolder. I'm working on a clean VM as a host for Docker containers. I have a dockerized Wordpress listening on 8080 on the VM. I can hit Wordpress at http://<vm_ip>:8080 and install just fine. It takes me to the backend at http://<vm_ip>:8080/wp-admin/ and everything works as expected. Now I'd like to access my blog at http://<vm_ip>/blog/ so I set …
Category: Web

WordPress wp-admin https redirect loop

I am using nginx as my webserver and i have edited the configuration file to point to https, so i change the WordPress url settings to https and also added the WordPress force ssl admin code to my wp-config file but I keep running into the error "This webpage has a redirect loop"
Category: Web

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.