The File Block allows you to add a link to the downloadable files on your website.
In this video you can see how to use the file block and the different settings to modify how it is displayed.
How to add a File block to your post or page:
- To add a file block, use the “Block Inserter” (+), or you can type
/file
in a new paragraph block and press enter.
Detailed instructions on adding blocks can be found here.
- To add a file, you can use the upload button to upload your files directly from your computer, or you can click ‘Media Library’ to add files from your media library.

After you add a file, you can edit the file name by typing inside the rectangle. You can click ‘Replace’ to replace the file and upload another one. You can click ‘Copy URL’ to copy the URL of the file.

Block Toolbar
Every block comes with unique toolbar icons and block specific user controls that allow you to manipulate the block right in the editor.
The File block has seven buttons:
- Transform to
- Drag icon
- Move handles
- Change alignment
- Replace
- Copy URL
- More options
Transform to:
When you click on the Transform button you can convert the File block into a Group, Columns, or Image block.

The Group gives you the ability to change the background color around the File block.

Drag icon

To drag and drop the block to a new location on the page template, click and hold the rectangle of dots, then drag to the new location. The blue separator line indicates where the block will be placed. Release the left mouse button when you find the new location to place the block.
Move handles

The up and down arrow icons can be used to move a block up and down on the page.
Detailed instructions on moving a block within the editor can be found here
Change Alignment

Using the alignment drop-down from the toolbar, you can align the file block to the left, make it center-aligned, or align it to the right. You can also make the file block wide width and full width.
Replace
Using the Replace button, you can replace your file by uploading a new one from your device or adding another one from your media library.

Copy URL
Click Copy URL to copy the URL of the file to your clipboard. You will see a message on the bottom left corner of your browser saying the URL has been copied.

More Rich Text Controls
Clicking on the file name in the File block will display three more buttons in the Block Toolbar – Bold, Italic, and More Rich Text controls.

Use the “Bold” option or “Ctrl+B” / “Cmd+B” on your keyboard to bold it, which is usually heavier than the surrounding text.

Use the “Italic” option or “Ctrl+I” / “Cmd+I” on your keyboard to italicize it, which usually appears slanted to the right.

More Rich Text controls
Highlight
Use the Highlight option to change the color of the selected text and its background.

Inline code
Use the Inline code feature to format code snippets within your text differently. Not only that, but Inline code formatting also prevents the code to be executed instead of displayed.
Inline image
The Inline image feature allows you to add an image to your block. It has one option: enter the desired pixel width for your image.
Keyboard Input
The Keyboard Input option allows you to add the <kbd>
tag to selected text.
Strikethrough
Use the Strikethrough option to place a horizontal line through the middle of the selected text.
Example: File Block
Subscript
Use the Subscript option to set the selected text slightly below the normal line of type.
Example: File Block
Superscript
Use the Superscript option to set the selected text slightly above the normal line of type.
Example: File Block
More Options:

Hide Block Settings
The Hide Block Settings option hides (or shows) the Block Setting panel in the editor’s sidebar.
Copy
Copy can be used to copy the selected block and then paste it wherever you want in the editor.
Duplicate
Duplicate can be used to duplicate the selected block.
Insert Before
Insert a new block before the selected block(s).
Insert After
Insert a new block after the selected block(s).
Move To
If you select Move To, you will get a blue line inside your content, you can then use the arrows to move that line, up and down to where you want the selected content to be moved into, hitting return on your keyboard at that point moves the block to that position.
Edit as HTML
The Edit as HTML option allows you to modify the HTML code of the block.
Lock
Since WordPress 6.0, you can lock the block to disallow moving and/or removing. If you lock the block, “Lock” icon will be shown in the Block Toolbar.

For more details about Lock, refer to More Options.
Add to Reusable blocks
Using the Add to Reusable blocks option lets you add the selected block to a list of reusable blocks, so you can use them on other posts or pages as well.
Group
Select the Group option if you want to create a group of blocks and treat them as a unit. You can for instance add a common background color or other blocks to the group.
Remove File
With the Remove File option, you can delete the selected block from your content.
Block Settings
Every block has specific options in the editor sidebar in addition to the options found in the block toolbar. If you do not see the sidebar, simply click the ‘cog’ icon next to the Publish button.

The file block offers Text link settings, Download button settings, and advanced options.
Text link settings
You can choose whether to link to the media file directly or a separate attachment page.
You can also choose if you want the media file/attachment page to open in a new tab or not by switching the ‘Open in a new tab’ button.
Download button settings
The File block comes with a Download button that can be toggled on and off using the ‘Show download button’.
By toggling it off, the file name will appear as a link.
Advanced
The “Advanced” tab lets you add HTML anchor and CSS class(es) to your block.
“HTML anchor” allows you to make a unique web address for a particular “File” block. Then, you’ll be able to link directly to a “File” block of your page.
The “Additional CSS class(es)” lets you add CSS class(es) to your block, allowing you to write custom CSS and style the block as you see fit.
Changelog
- Updated 2022-06-21
- Updated content and screenshots for 6.0
- Added ALT Tags for images
- Updated 2022-06-07
- Add video for 6.0
- Updated 2020-09-19
- Updated new block toolbar features
- Updated new block settings features
- Updated 5.5 screenshots
- Updated 2020-06-18
- Added ‘Link back to blocks’ to the top of the page
- Converted the ‘Advance’ reusable block to a regular block
- Added the ‘Changelog’
- Created 2019-03-07
Was this article helpful? How could it be improved?
You must be logged in to submit feedback.