Page Not Found 404 Error when accessing PDF on Local by Flywheel Site - but no error for same URL on live production site

On the production, live site, I can access all PDF documents with no error, for example:

Using Local by Flywheel site, imported using Duplicator archive, I get a 404 page not found error for this same URL (same relative url, different domain, of course, for local):

https://twfm20190116.local/wp-content/uploads/2016/06/prayer-cabin-gift-certificate-order-form.pdf

I can create a Live Link, if you want to try it yourself.

I am running WP 5.0.3, Local 3.0.3, Duplicator plugin Version 1.3.2 (to create the archive.zip of the production site).

I tried resaving the Permalinks, but this did not fix the 404 error.

I went to Media Library and the PDF is there with the above URL

https://twfm20190116.local/wp-content/uploads/2016/06/prayer-cabin-gift-certificate-order-form.pdf

This 404 error happens with all PDFs on the site, not just this one example.

I cannot find any other articles on this topic, so am creating this new topic. Any ideas?

Normally a 404 error would occur, if the file was not found by the web-server. Does this error occur if you try to access the files directly, i.e. without the Permalinks?

The issue was “user error” – I created the local site using an archive.zip that I created using Duplicator – where I had filtered-out (not included) all PDF files (pdf file extension) and other files, so as to build an archive faster. PDF files are not part of my testing goals, so are not needed in local site testing, but I totally forgot that I had filtered-out all PDF files. This is the reason for the 404 error. By the way, a few days ago, I asked the moderator to remove this post, since I found the problem – and the problem was me!

No worries. Glad you got it working!