Adding a downloadable PDF to a WordPress article can be done using the built-in Gutenberg editor (File block) or by linking text/buttons directly to a file in the Media Library.
Here are the primary methods to add a PDF download link in WordPress:
Method 1: Using the “File” Block (Recommended)
This is the easiest, native way to add a PDF with a automatic download button.
- Edit the post/page where you want the PDF.
- Click the + (Toggle block inserter) icon and search for “File”.
- Select the File block.
- Click Upload to choose a new PDF from your computer, or Media Library to select one already uploaded.
- By default, WordPress will display the PDF file name and a “Download” button.
- Customize: Click on the text to rename the link. You can change the button text, and in the block settings (right sidebar), you can toggle the “Show download button” on or off.
- Pro Tip: In the right sidebar settings, you can toggle “Open in new tab” to prevent users from leaving your site.
Method 2: Creating a Text Link
If you prefer a simple text link (e.g., “Download Guide”) rather than a button.
- Go to Media > Add New and upload your PDF.
- Click on the uploaded file and click “Copy URL to clipboard”.
- Edit your article, highlight the text you want to turn into a link.
- Click the Link icon in the toolbar, paste the URL, and press enter.
- It is recommended to set this link to open in a new tab.
Method 3: Using a Button Block
- Upload the PDF to the Media Library and copy its URL.
- In the post editor, add a Button block.
- Add text like “Download PDF”.
- Click the Link icon on the button and paste your PDF URL.
Best Practices for PDFs in WordPress
- Use Descriptive Filenames: Rename your file (e.g., january-report.pdf instead of DCIM001.pdf) before uploading for better SEO and user experience.
- Optimize File Size: Large PDFs can slow down your site. Compress them to a reasonable size.
- Use Plugins for Advanced Needs: If you need to embed the PDF (viewable in the browser) or provide analytics, use plugins like PDF Embedder or EmbedPress.
- For External Storage: If the PDF is very large, consider uploading it to Google Drive or Dropbox and using that link instead to save bandwidth.
365technoblog is a No.1 source for technology related tips and discussions – app, IT security, smartphones, etc. 365technoblog also welcomes guest’s writers.




Comments