You can add a PDF file to your website by uploading it through your control panel's File Manager (for plain HTML sites) or through the Media Library (for WordPress sites). Choose the method that matches your site below.
Uploading a PDF with cPanel or DirectAdmin
If your site is not built on WordPress, upload the PDF directly to your hosting account and link to it from your web pages.
cPanel
- Log in to cPanel and, under the Files section, open File Manager.
- Navigate to the folder where you want the PDF to appear, usually inside
public_html. - Click Upload at the top of the screen.
- Select Overwrite existing files if you are replacing a PDF with the same filename.
- Click Select File, choose the PDF on your computer, and wait for the upload to finish.
- Visit the file in your browser to check it uploaded correctly, for example
example.com/filename.pdf, orexample.com/documents/filename.pdfif you used a subfolder.
DirectAdmin
- Log in to DirectAdmin and, under System Info & Files, open File Manager.
- Open the domains directory and select your domain, then open its public_html folder.
- Navigate to the folder where you want the PDF to appear.
- Click Upload File (or New then Upload files, depending on your theme).
- Select the PDF from your computer, or drag it into the upload window, then click Upload.
- Visit the file in your browser to check it uploaded correctly, for example
example.com/filename.pdf.
Linking to the PDF from your web page
- Copy the web address of the uploaded PDF, for example
example.com/documents/filename.pdf. - Edit the page where you want the link and select the text or button you want visitors to click.
- Paste the PDF's web address into the link or URL field for that text or button.
- Save and publish the page, then click the link on the live site to confirm it opens the PDF.
Uploading a PDF in WordPress
If your site runs on WordPress, add the PDF through the Media Library and then link or embed it in a page or post.
- Log in to your WordPress dashboard and go to Media > Add New.
- Drag the PDF into the upload area, or click Select Files and choose it from your computer.
- Wait for the filename, file size and a PDF icon to appear, confirming the upload worked.
Adding a text link to the PDF (block editor)
- Go to Media > Library, open the PDF, and copy its File URL.
- Edit the page or post where you want the link, and type or select the text to link.
- Click the Add link option in the toolbar, paste the PDF's URL, and confirm.
- Update or publish the page, then click the link to check it opens the PDF.
Embedding the PDF directly in a page (block editor)
- Edit the page or post, click the + icon to add a block, and choose the File block.
- Select Media Library, choose your uploaded PDF, and click Select.
- WordPress embeds the PDF with a preview; turn on the Download option in the block settings if you want a download button to appear.
- Update or publish the page to make it live.
For a more advanced PDF viewer with page navigation and zoom, you can install a PDF-viewer plugin from the Plugins screen in your dashboard.
Troubleshooting
- If the PDF won't open or download, check its file permissions: in File Manager, select the file, choose Change Permissions (or CHMOD), and set it to 644.
- If the upload fails or stalls, the file may be larger than your hosting plan's upload limit; try a smaller test file, or check the limit by logging in to the client area or reviewing your welcome email.
- For large PDFs or several files at once, upload via an FTP client instead of File Manager.
- Keep PDF files reasonably small, as a large media library can slow down your site over time.
