hello,
If you’re encountering an error like “There was an error opening the temp file” when trying to upload a video in WordPress, you can try the following steps:
- Check File Size: Ensure that the video file size is within the maximum upload limit allowed by your WordPress installation. You can check and adjust this limit in your WordPress settings or contact your hosting provider.
- File Permissions: Verify that the temporary folder used by WordPress for uploads has the correct permissions. The folder should be writable by the server. You can check and adjust folder permissions using an FTP client or through your hosting provider’s file manager.
- Clear Browser Cache: Sometimes, browser cache issues can cause problems during file uploads. Try clearing your browser cache and attempting the upload again.
- Update WordPress and Plugins: Make sure your WordPress installation and all plugins are up-to-date. Outdated software can sometimes lead to compatibility issues.
- PHP Version Compatibility: Ensure that your hosting server is running a compatible PHP version with your WordPress version. You can check the recommended PHP version for your WordPress version on the official WordPress website.
- Check Server Storage: Confirm that there is enough available storage space on your hosting server. If your server is running out of space, it may prevent file uploads.
- also you can allow mime type in your theme’s function file put following code in function file.
function custom_allow_mime_types($mimes) {
// Add your custom MIME types to the array
$mimes['svg'] = 'image/svg+xml';
$mimes['mp4'] = 'video/mp4';
// You can add more MIME types as needed
return $mimes;
}
add_filter('upload_mimes', 'custom_allow_mime_types');
Hope it’s help you. Thank you
-
This reply was modified 1 year, 1 month ago by
pooja9712.