最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

Uploading pictures to the Media Library: “Specified file failed upload test.”

programmeradmin1浏览0评论

I changed my domain this week and lost most (but strangely, not all) uploaded pictures in the Media Library. When I try to re-upload them I get, "Specified file failed upload test."

I’ve enabled the following settings in wp-config.php but am not seeing any debug output in debug.log:

define(‘WP_DEBUG’, true); 
define( ‘WP_DEBUG_LOG’, true ); 
define( ‘WP_DEBUG_DISPLAY’, true );

There's also no debug output in either the Apache or PHP error logs. I tail the logs and during the upload, no output.

I've run Health Check and disabled all plugins but it’s still doing it. I've installed mod_security but tried the same with it disabled. (SecRuleEngine Off) I’ve installed Wordfence as well but it should have been disabled during the Health Check disable plugins test.

I tried this in the .htaccess, no good:

<IfModule mod_security.c>
    SecFilterEngine Off
    SecFilterScanPOST Off
</IfModule>

Also, the classic browser uploader option silently fails.

Tried the WP Health plugin and it says everything is good.

The wp-content/uploads directory’s permissions are 750. Tried 755.

This may or may not be important: My WP install is linked to my WP account. I wonder if the domain name change boogered something up? All other functionality that I have tested is now successful since the domain name change.

I am on WP 5.1.1. What else can I look at?

I changed my domain this week and lost most (but strangely, not all) uploaded pictures in the Media Library. When I try to re-upload them I get, "Specified file failed upload test."

I’ve enabled the following settings in wp-config.php but am not seeing any debug output in debug.log:

define(‘WP_DEBUG’, true); 
define( ‘WP_DEBUG_LOG’, true ); 
define( ‘WP_DEBUG_DISPLAY’, true );

There's also no debug output in either the Apache or PHP error logs. I tail the logs and during the upload, no output.

I've run Health Check and disabled all plugins but it’s still doing it. I've installed mod_security but tried the same with it disabled. (SecRuleEngine Off) I’ve installed Wordfence as well but it should have been disabled during the Health Check disable plugins test.

I tried this in the .htaccess, no good:

<IfModule mod_security.c>
    SecFilterEngine Off
    SecFilterScanPOST Off
</IfModule>

Also, the classic browser uploader option silently fails.

Tried the WP Health plugin and it says everything is good.

The wp-content/uploads directory’s permissions are 750. Tried 755.

This may or may not be important: My WP install is linked to my WP account. I wonder if the domain name change boogered something up? All other functionality that I have tested is now successful since the domain name change.

I am on WP 5.1.1. What else can I look at?

Share Improve this question asked Apr 4, 2019 at 14:05 Christopher de VidalChristopher de Vidal 12 bronze badges
Add a comment  | 

1 Answer 1

Reset to default -1

Fixed :-) I had set file_uploads = Off in php.ini.

发布评论

评论列表(0)

  1. 暂无评论