Error: The uploaded file could not be moved
-
Hi,
Using 4.0.1 and a new file upload as suggested in another post, I still receive the following error:
string(187) "The uploaded file could not be moved to /home/[sitename]/public_html/[sitename]//wp-content/uploads/2022/12/test.png. This is most likely an issue with permissions, or upload failed."
-
Hi barisko,
Thank you for your message!
In order to better assist you, we would appreciate it if you could provide us with the following information:
- An explanation of when exactly this issue happens: doing what action, clicking on what button, on what screen, with what settings, etc.
- Your site information. For this, please go to Tools > Site Health > Info, click on the “Copy site info to clipboard” button and paste the information here.
- Is the issue occurring in more than one web browser (Chrome, Firefox, Edge, Safari, etc.)?
- Does the issue happen with newly uploaded images, or only with existing images?
Thank you,
Hi, I just encountered the same issue.
WP 6.1.1
Enable Media Replace 4.0.1Steps:
1. From Media Library, I click Replace media for a specific image
2. Then I get Replace Media Upload screen. Usually, I will see the old image. But now, I can only see a grey cross. Screenshot: https://drive.google.com/file/d/1xA7iZAYxgQN9YuGsaW5Knxdm2G2Jvmhw/view?usp=sharing
3. If I continue and click Choose File and choose a new image, I will see the new image on the right side but somehow the image box doesn’t follow the image dimensions. And I got warning about different file type. Screenshot: https://drive.google.com/file/d/1XLIJVmkTWFk0r5FtMkL3a5cUg3vLLQcv/view?usp=sharing
4. When I still continue and click Upload, I will get the same error message as what barisko provided in the beginning of this thread.Site info: https://drive.google.com/file/d/13SQ5xTAHYwrmIHazEnpWDsH_sQt95l1D/view?usp=sharing
Uploading new media works. I only have issue when trying to replace an image using your plug-in. I tried using different browsers (Edge and Firefox) with the same result.
Hi ihutagalung,
Sorry, I think I didn’t explain myself properly. Does the issue happen when you try to replace an image that has been uploaded today, or does it only happen with existing images from time ago?
Thanks!
hi sixaxis,
The files are old image files. There are 3 image files that I replace every month with a new/updated one. The last time I did that was on 12 November (last month), which worked fine.
An explanation of when exactly this issue happens: doing what action, clicking on what button, on what screen, with what settings, etc.
1. Go to Media Library
2. Open image
3. Click ‘Upload a new file’
4. Browse and select new file
– Replace options: Just replace the file
– Date Options: Replace the date with the current date
5. Click uploadIs the issue occurring in more than one web browser (Chrome, Firefox, Edge, Safari, etc.)?
– Firefox & ChromeDoes the issue happen with newly uploaded images, or only with existing images?
– Newly uploaded imagesSite information:
### wp-core ### version: 5.6 site_language: nl_NL_formal user_language: nl_NL_formal timezone: Europe/Amsterdam permalink: /%postname%/ https_status: true multisite: true user_registration: false blog_public: 1 default_comment_status: closed environment_type: production user_count: 10 site_count: 1 network_count: 1 dotorg_communication: true ### wp-active-theme ### name: ****** (******) version: 1.0.0.3 author: ****** author_website: https://******.com/ parent_theme: none theme_features: core-block-patterns, post-thumbnails, automatic-feed-links, title-tag, menus, html5, custom-background, customize-selective-refresh-widgets, custom-logo, custom-header, widgets theme_path: /home/******/public_html/******/wp-content/themes/****** ### wp-themes-inactive (3) ### Center: version: 1.0.0.3, author: ****** Retraites: version: 1.0.0.4, author: ****** Sangha: version: 1.0.0.3, author: ****** ### wp-mu-plugins (1) ### WP Migrate DB Compatibility: version: 1.2, author: Delicious Brains ### wp-plugins-active (25) ### Activity Log: version: 2.8.5, author: Activity Log Team Admin CSS MU: version: 2.5, author: Arun Basil Lal (latest version: 2.7) Advanced Custom Fields: version: 5.9.3, author: Elliot Condon (latest version: 6.0.6) Bootstrap for Contact Form 7: version: 1.4.8, author: Felix Arntz Classic Editor: version: 1.6.2, author: WordPress Contributors Contact Form 7: version: 5.3.1, author: Takayuki Miyoshi Custom User Profile Photo: version: 0.5.3, author: VincentListrani Divi Builder: version: 4.19.2, author: Elegant Themes (latest version: 4.19.3) Enable Media Replace: version: 4.0.1, author: ShortPixel Google Tag Manager for WordPress: version: 1.11.6, author: Thomas Geiger (latest version: 1.16.2) Grow Social by Mediavine: version: 1.18.1, author: Mediavine (latest version: 1.20.2) Lana Downloads Manager: version: 1.8.1, author: Lana Codes Loco Translate: version: 2.4.6, author: Tim Whitlock (latest version: 2.6.3) Login No Captcha reCAPTCHA (Google): version: 1.7, author: Robert Peake and Contributors Mixed Feature Plugin: version: 1, author: The Web Fosters Polylang: version: 2.9, author: WP SYNTEX Redirection: version: 5.3.5, author: John Godley (latest version: 5.3.6) Regenerate Thumbnails: version: 3.1.4, author: Alex Mills (Viper007Bond) (latest version: 3.1.5) Widget for Google Reviews: version: 1.9, author: RichPlugins <[email protected]> (latest version: 2.2.4) Wordfence Security: version: 7.8.2, author: Wordfence WP Mail SMTP: version: 2.5.1, author: WPForms (latest version: 3.6.1) WP Migrate Lite: version: 2.5.0, author: Delicious Brains WP Table Builder: version: 1.4.5, author: WP Table Builder Yoast Duplicate Post: version: 3.2.6, author: Enrico Battocchi & Team Yoast Yoast SEO: version: 15.4, author: Team Yoast ### wp-plugins-inactive (4) ### Contact Form 7 - Dynamic Text Extension: version: 2.0.3, author: Chris Mavricos, SevenSpark Crop Thumbnails: version: 1.2.6, author: Volkmar Kantor (latest version: 1.4.0) HubSpot All-In-One Marketing - Forms, Popups, Live Chat: version: 7.48.24, author: HubSpot (latest version: 9.2.12) iThemes Security: version: 7.9.0, author: iThemes ### wp-media ### image_editor: WP_Image_Editor_Imagick imagick_module_version: 1690 imagemagick_version: ImageMagick 6.9.10-68 Q16 x86_64 2021-10-14 https://imagemagick.org file_uploads: File uploads is turned off post_max_size: 256M upload_max_filesize: 256M max_effective_size: 256 MB max_file_uploads: 20 imagick_limits: imagick::RESOURCETYPE_AREA: 47 GB imagick::RESOURCETYPE_DISK: 9.2233720368548E+18 imagick::RESOURCETYPE_FILE: 6144 imagick::RESOURCETYPE_MAP: 47 GB imagick::RESOURCETYPE_MEMORY: 23 GB imagick::RESOURCETYPE_THREAD: 1 gd_version: bundled (2.1.0 compatible) ghostscript_version: not available ### wp-server ### server_architecture: Linux 3.10.0-1160.45.1.el7.x86_64 x86_64 httpd_software: Apache php_version: 7.4.33 64bit php_sapi: fpm-fcgi max_input_variables: 10000 time_limit: 300 memory_limit: 256M max_input_time: 60 upload_max_filesize: 256M php_post_max_size: 256M curl_version: 7.29.0 NSS/3.53.1 suhosin: false imagick_availability: true pretty_permalinks: true htaccess_extra_rules: true ### wp-database ### extension: mysqli server_version: 10.2.44-MariaDB client_version: mysqlnd 7.4.33 ### wp-constants ### WP_HOME: undefined WP_SITEURL: undefined WP_CONTENT_DIR: /home/******/public_html/******/wp-content WP_PLUGIN_DIR: /home/******/public_html/******/wp-content/plugins WP_MAX_MEMORY_LIMIT: 256M WP_DEBUG: false WP_DEBUG_DISPLAY: true WP_DEBUG_LOG: false SCRIPT_DEBUG: false WP_CACHE: false CONCATENATE_SCRIPTS: undefined COMPRESS_SCRIPTS: undefined COMPRESS_CSS: undefined WP_LOCAL_DEV: undefined DB_CHARSET: utf8 DB_COLLATE: undefined ### wp-filesystem ### wordpress: writable wp-content: writable uploads: writable plugins: writable themes: writable mu-plugins: writable ### wp_mail_smtp ### version: 2.5.1 license_key_type: lite debug: Geen fout opsporing berichten gevonden. db_tables: wp_wpmailsmtp_tasks_meta ### pll_options ### browser: true rewrite: 1 hide_default: 1 force_lang: 1 redirect_lang: 0 media_support: true sync: 0 post_types: post, page, wp_block, attachment, training taxonomies: 0 domains: 0 version: 2.9 default_lang: nl menu-1: nl => 17 | en => 14 menu-2: nl => 18 | en => 16 menu-3: nl => 19 | en => 15 previous_version: 2.8.4 ### pll_language_nl ### term_id: 3 name: Nederlands slug: nl term_group: 0 term_taxonomy_id: 3 count: 233 tl_term_id: 4 tl_term_taxonomy_id: 4 tl_count: 3 locale: nl_NL_formal is_rtl: 0 w3c: nl-NL facebook: nl_NL flag_url: https://www.******/wp-content/plugins/polylang/flags/nl.png home_url: https://www.******/ search_url: https://www.******/ mo_id: 6 page_on_front: 4085 page_for_posts: 0 flag_code: nl ### pll_language_en ### term_id: 6 name: English slug: en term_group: 1 term_taxonomy_id: 6 count: 188 tl_term_id: 7 tl_term_taxonomy_id: 7 tl_count: 1 locale: en_US is_rtl: 0 w3c: en-US facebook: en_US flag_url: https://www.******/wp-content/plugins/polylang/flags/gb.png home_url: https://www.******/en/home-eng/ search_url: https://www.******/en/ mo_id: 9 page_on_front: 4172 page_for_posts: 0 flag_code: gb
@barisko Could you please update your WordPress installation as well as all your plugins and theme? I see that many components are outdated, so perhaps there’s a bug that has been fixed long ago?
Thank you,
hi @sixaxis, how about my case? Do we have a clear root cause on the issue? I can see that the error only happens when it’s old image, e.g. images I last replaced using your plugin on 12 November 2022. For a new image that I uploaded on 14 December 2022, it doesn’t happen.
ihutagalung, could you please open a new thread for your particular case? The troubleshooting steps may be different, so we’d like to keep things organized.
Thank you!
@sixaxis thanks for your reply. The theme is a custom theme build by a third party. I’m not comfortable upgrading to the latest version of WP because I’m not sure if the theme will break.
I understand, barisko. However, WordPress 5.6 was released more than 2 years ago, and many things have changed since then.
Updating WordPress is an essential step of the troubleshooting process, so when you get a chance to do it, let us know how it worked!
Hello @barisko,
I noticed that among other plugins, you’re also using Polylang.
Can you please try to temporarily deactivate this plugin, then try to replace a file and let us know if it works? We recently got another report regarding Polylang preventing our plugin from doing the replace properly and I’d like to double check if this is the issue here as well.
Thanks!
string(210) "The uploaded file could not be moved to /home/[sitename]/public_html/[sitename]//wp-content/uploads/2023/01/file.pdf. This is most likely an issue with permissions, or upload failed."
Unfortunately, the same error with Polylang disabled.
Unfortunately, the same error with Polylang disabled.
I understand, then it must be something else.
Just to clarify: are you getting this error message with a newly uploaded file that you are trying to replace, or it happens just on older files? I’m asking this because older files might have their paths and/or metadata corrupted. If that’s the case, then it’s best to simply delete that old file and upload it again.With new files.
Hello @barisko, can you please try again with version 4.0.2 that was just released and let us know if you still face the same issue, with newly uploaded files? Thanks!
- The topic ‘Error: The uploaded file could not be moved’ is closed to new replies.