Ошибка загрузки мультимедиа Wordpress «Отсутствует временная папка» на локальном сервере ⇐ Php
-
Anonymous
Ошибка загрузки мультимедиа Wordpress «Отсутствует временная папка» на локальном сервере
I am currently developping a WordPress website locally since I have much work to do before getting it uploaded. For local hosting purpose, I am using Local by Flywheel. As I wanted to start testing pages layout, I tried to upload some media in the classic WP Media Uploader but I continuously get the error "XXXX has failed to upload: Missing a temporary folder.".
I've looked for the answer on the Internet and did found the "edit the wp-config.php technique" that's seems to be the only answer to this problem, but actually it does not work for me. Here's a view of the 'custom side' my wp-config file: `
/* Add any custom values between this line and the "stop editing" line. */ define('WP_TEMP_DIR', dirname(__FILE__) . '\wp-content\temp'); /* That's all, stop editing! Happy publishing. */ /** Absolute path to the WordPress directory. */ if ( ! defined( 'ABSPATH' ) ) { define( 'ABSPATH', __DIR__ . '/' ); } /** Sets up WordPress vars and included files. */ require_once ABSPATH . 'wp-settings.php'; A call of var_dump(get_temp_dir()) returns this:
[abs path]\app\public\wp-content\temp/' Which seems to tell that the wp-config.php works correctly.
Often, online tutorials also say to set permission 755 on the "temp" folder, but since this folder is not on a remote server accessed via FTP, it does not seems that I can set that. I also read to edit my "php.ini" file but I do not have this file in my local site folders.
Does someone knows what I should do ?
Источник: https://stackoverflow.com/questions/742 ... cal-server
I am currently developping a WordPress website locally since I have much work to do before getting it uploaded. For local hosting purpose, I am using Local by Flywheel. As I wanted to start testing pages layout, I tried to upload some media in the classic WP Media Uploader but I continuously get the error "XXXX has failed to upload: Missing a temporary folder.".
I've looked for the answer on the Internet and did found the "edit the wp-config.php technique" that's seems to be the only answer to this problem, but actually it does not work for me. Here's a view of the 'custom side' my wp-config file: `
/* Add any custom values between this line and the "stop editing" line. */ define('WP_TEMP_DIR', dirname(__FILE__) . '\wp-content\temp'); /* That's all, stop editing! Happy publishing. */ /** Absolute path to the WordPress directory. */ if ( ! defined( 'ABSPATH' ) ) { define( 'ABSPATH', __DIR__ . '/' ); } /** Sets up WordPress vars and included files. */ require_once ABSPATH . 'wp-settings.php'; A call of var_dump(get_temp_dir()) returns this:
[abs path]\app\public\wp-content\temp/' Which seems to tell that the wp-config.php works correctly.
Often, online tutorials also say to set permission 755 on the "temp" folder, but since this folder is not on a remote server accessed via FTP, it does not seems that I can set that. I also read to edit my "php.ini" file but I do not have this file in my local site folders.
Does someone knows what I should do ?
Источник: https://stackoverflow.com/questions/742 ... cal-server
Мобильная версия