$conf, $runtime; function_exists('chdir') AND chdir(APP_PATH); $r = 'mysql' == $conf['cache']['type'] ? website_set('runtime', $runtime) : cache_set('runtime', $runtime); } function runtime_truncate() { global $conf; 'mysql' == $conf['cache']['type'] ? website_set('runtime', '') : cache_delete('runtime'); } register_shutdown_function('runtime_save'); ?>I cannot upload images to post or the media library in wordpress|Programmer puzzle solving
最新消息:Welcome to the puzzle paradise for programmers! Here, a well-designed puzzle awaits you. From code logic puzzles to algorithmic challenges, each level is closely centered on the programmer's expertise and skills. Whether you're a novice programmer or an experienced tech guru, you'll find your own challenges on this site. In the process of solving puzzles, you can not only exercise your thinking skills, but also deepen your understanding and application of programming knowledge. Come to start this puzzle journey full of wisdom and challenges, with many programmers to compete with each other and show your programming wisdom! Translated with DeepL.com (free version)

I cannot upload images to post or the media library in wordpress

matteradmin9PV0评论

Whenever I try to upload featured image for a new post or edit featured image of the older post, the following errors comes up:

An error occurred in the upload. Please try again later.

Here I have attached screenshots,

Whenever I try to upload featured image for a new post or edit featured image of the older post, the following errors comes up:

An error occurred in the upload. Please try again later.

Here I have attached screenshots,

Share Improve this question asked Feb 2, 2019 at 12:47 Sujal PaudelSujal Paudel 11 bronze badge 2
  • Check in the Browser console, there should be an error. That will tell you about it is. Post the error here. – Lucien Dubois Commented Feb 2, 2019 at 15:07
  • Also, add define( 'WP_DEBUG', true ); and define( 'WP_DEBUG_LOG', true ); to your /wp-config.php above the line that says "Stop editing". This will create a file in /wp-content/debug.log that may have some errors after trying to upload again. – phatskat Commented Feb 6, 2019 at 6:46
Add a comment  | 

1 Answer 1

Reset to default 0

Make sure the wp-content/uploads directory is writable.

In Ubuntu, open the terminal, then type

chmod 777 -R /var/www/html/wordpress/wp-content/uploads

Adjust that command to your WordPress installation directory. Then, try again.

Post a comment

comment list (0)

  1. No comments so far