There are three ways to add videos in WordPress: Upload video files using a media uploader. Use the video block to upload video files or embed video platform code. Embed video platform code directly.
How to add a video in WordPress
Method 1: Use the media uploader
- Log in to your WordPress dash board.
- Click "Media >Add New" in the left column menu.
- Click the "Select File" button to select the video file to upload.
- Wait for the video to be uploaded.
- After the upload is completed, the video will be displayed in the media library.
Method Two: Using Video Blocks
- In your post or page editor, click the Add Block icon.
- Search for "video" in the block directory.
- Drag and drop the video block to the desired location.
- Click the "Upload" button in the video block and select the video file you want to upload.
- It is also possible to embed videos from video platforms such as YouTube, Vimeo or Dailymotion.
Method 3: Embed the code directly
- Host the video to a video platform such as YouTube, Vimeo or Dailymotion.
- Copy the video's embed code.
- In your post or page editor, switch to "Text" mode.
- Paste the embed code and save changes.
Additional Options
-
Set video options:Click the "Edit" button on the video block to adjust the video's playback settings, size and Alignment.
-
Use Featured Image: If you added a video, you can skip setting the featured image as the video will automatically appear as the featured image.
-
Optimize videos: Consider optimizing video files to increase loading speed and save bandwidth.
The above is the detailed content of How to add video in wordpress. For more information, please follow other related articles on the PHP Chinese website!