How to Fix PDFs Not Opening Correctly on a WordPress Website
Question details
Users are experiencing issues where a PDF file fails to open, load, or display properly when accessed via a link or embed on a WordPress site.

- Product
- WordPress / PDF
- Device & OS
- not provided
- Scenario
- Embedding or linking a PDF document on a WordPress website for public access.
- Observed behavior
- The PDF fails to open, displays an error message, or renders incorrectly in the browser instead of showing the expected document content.
Before modifying your WordPress settings, ensure the PDF file itself is not corrupted by opening it locally on your computer with a reliable PDF reader.
Verify Direct Link Accessibility and File Integrity
Ensure the PDF is actually accessible on the server and is not a corrupted file.
Often, the issue is not with the WordPress page itself, but with the file permissions or the integrity of the uploaded PDF. Testing the direct link isolates the problem.
Go to your WordPress Dashboard, navigate to 'Media' > 'Library', click on the problematic PDF, and copy the 'File URL'.
Open a new Incognito or Private Browsing window and paste the URL. This bypasses any logged-in WordPress session to test public access.
If the file opens successfully, the issue lies with how it is embedded on the page. If it throws a 404 or 403 error, check your server file permissions. If it downloads but cannot be opened locally, the file is corrupted and needs to be re-uploaded.

Check for Plugin Conflicts
Security or caching plugins can sometimes block direct access to media files like PDFs.
Ensure Server Returns Correct Content-Type
Your hosting server must correctly identify the file as a PDF (application/pdf) for browsers to display it inline.
Create and Optimize Web-Friendly PDFs with WPS Office
To prevent corruption and ensure your PDFs load flawlessly on WordPress and other websites, use WPS Office to create, compress, and export standard-compliant PDF files.
- 1. Open your document: Launch WPS Office and open your original document (Word, Excel, or PowerPoint) that you want to share online.
- 2. Export to PDF: Click the 'Menu' button and select 'Export to PDF' to generate a web-standard PDF file.
- 3. Compress the PDF (Optional): If the file is large, open the PDF in WPS PDF and use the 'Compress' tool to reduce its size for faster WordPress loading.
- 4. Upload to WordPress: Upload the newly optimized, uncorrupted PDF to your WordPress Media Library and link it on your site.

Frequently Asked Questions
Why does my WordPress PDF link force a download instead of opening in the browser?
This usually happens if the server forces an 'application/octet-stream' header or a 'Content-Disposition: attachment' header instead of displaying it inline. You may need to adjust your server's MIME type settings or use a dedicated PDF embed plugin to force inline viewing.
What is the maximum PDF file size I can upload to WordPress?
The maximum upload limit is determined by your hosting provider, often ranging from 2MB to 128MB. You can check this limit in the WordPress Media Library. Compressing your PDF using a tool like WPS Office before uploading is highly recommended for faster load times and to avoid upload failures.
Are there any WordPress plugins specifically for displaying PDFs?
Yes, you can use plugins like PDF Embedder, EmbedPress, or the native WordPress File block to embed PDFs directly into your posts or pages. These plugins use JavaScript to render the document, which often resolves standard linking and browser compatibility errors.




