Wordpress 404 handler with PuPHPet Vagrant - wordpress

I am struggling to make this work - my current 404 page is served from Apache, so I can't reach my theme's 404 page nor use a plugin like media-placeholder as the 404 will have to be server by Wordpress' 404 handler instead. I've generated my Vagrant machine using PuPHPet and there's no option that covers this issue.

Seems I found out how to make it work: under config.yaml > apache > files_match I've added fallbackresource: 404.php. Provisioned the machine again after that and regenerated my htaccess file by saving the permalinks again. Lookin good so far!

Related

Disable https redirects inside a wordpress directory

The problem: I've got some iot devices which can't follow redirects. They need to access a directory inside a wordpress site to get a bin file. Apache (i guess using the default wordpress htaccess) is redirecting http to https, and the devices end up receiving the 301 page instead of the bin file.
The solution(?): have and htaccess file in the directory with the bin file which disables any redirects. Assured the htaccess is in effect using 'Deny from all'. Then tried to 'RewriteEngine Off' but the redirects are still there. I'm using curl and wget to test, so there is no browser caching. Any insight on how to solve this is very welcome :)

Wordpress 404 issue after Migration in Plesk (Nginx config issue)

I recently migrated my website to DigitalOcean under plesk panel using all in one migration plugin. I kept having issues with 404 error only for pages that used permalinks configured as %postname%. For better URL format for my Content. But now if I enable the permalink I keep getting 404 error.
I used the popular suggestion of editing the nginx conf file through (through putty).
https://www.cyberciti.biz/faq/how-to-configure-nginx-for-wordpress-permalinks/
I wasn't sure of the save and exit step given after using the editor. ctrl+X shows a set of ^O^D commands. I pressed ^O and restarted it.
Now my entire website looks broken. Due to many 500 internal errors. What am I doing wrong here? kindly help me out please?
My website address is https://ourmoon.life/

Wordpress shows homepage (200) instead of 404 in > third url segment

I'm currently running into a strange problem with Wordpress on my production server. When I try to visit non-existing URLs, Wordpress doesn't trigger a 404 when the url has more than 3 segments, for example:
These pages don't exists and trigger a 404 page:
http://example.com/9
http://example.com/9/9
These also dont exist, but don't trigger a 404 page and show the homepage (with 200 response code):
http://example.com/9/9/9
http://example.com/9/9/9/9
http://example.com/9/9/9/9/9
On my local machine all above pages show a 404 (as expected). The server (and my local machine) are both running nginx >10.16, both nginx vhost configs are almost equal. Running PHP72-fpm.
Debugging I already did:
Disable functions.php in theme folder
Disable all plugins
Switch to other theme
Disable cloudflare caching
Flush permalinks
All without any success unfortunately.. I'm kinda running out of options for debugging, I hope anyone has got any suggestions!
I just found out that locally I'm running PHP73, on the production server PHP72. I've just upgraded the production server from PHP72 to PHP73 and the problem seems to be fixed!

Wordpress permalink doesnot work even after changing the value, updating manually or editing apache config

I am deploying a wordpress site [Application made using CMS feature] in AWS instance[I have an ip address: example: 5.32.44.55]
The homepage displays great. Rest of the pages shows 404 error
If I update the permalink: It works on basic one : ?page_id=sth
But once I make this with other setting, doesnot work.
Note: The menu link is given in page format: example.com/page
Tried to change it manually, gave all edit access, edited httpd config as well, nothing worked.
The page should load without showing 404 errors.
Check if Apache's mod_rewrite is enabled.
Go here - /etc/httpd/conf/httpd.conf
Change the 'AllowOverride None' line in the above section to read 'AllowOverride All'
Restart the Apache service

getting 404 error on wordpress pages

I've seen some other people with the same issue on net,
but the solution that worked for them (updating the .htacess file), didn't go very well for me!
I used buddypress to migrate my wordpress site to my local pc, but after everything is setup, only the home page is working, other posts or pages are getting 404 errors, I also tried to deactivate plugins and changing the theme, but nothing worked.
I'm on windows 10 and i'm using wampserver 2.5.
I think that the issue is caused by Apache, but I don't know how to fix it!
my Apache version is 2.4.9
Thanks in advance guys :)
Your site’s permalink (WordPress Admin > Settings > Permalink) is set as Default, please change it to any of the other option available below. e.g: Day and name, Post name etc.
Then you’ll be able to access the board instead of the 404 error.
Another way is troubleshooting:
WordPress sites can complicate the 404 troubleshooting process. Why? WordPress is a content management system that processes its own internal rewrite array as a part of its permalinks feature.
The first step to troubleshooting 404s is to figure out whether the 404 is being caused by the web server or by WordPress.
Static file
If your file is static (e.g. a jpg image) open your FTP client and verify that the file exists.
As an example, let’s say that the URL http://example.com/wp-content/uploads/picture.jpg is producing a 404 error. You will want to:
Open FTP Client and connect to your server (if you don’t know how to do so, read this.)
Navigate to the file’s location
Verify that the file exists
If it is does not exist, you have found the source of your 404.
However, it it does exist, yet pulling the URL up in a browser results in a 404 error, continue on to find out whether the issue is web server-based or WordPress-based.
Reference Link: http://websynthesis.com/fixing-wordpress-404-errors/

Resources