Can't get Media upload files to drop into the right directory in a subdirectory-installed WordPress. What is the appropriate way to...
wp-content
exists in both /wp-content
and /wp/wp-content
/wp-content/uploads/2018/06
/wp/wp-content/uploads/2018/06/some_image_name.jpg
http error
/wp
subdirectory https://www.example.com/wp
https://www.example.com/wp
upload_path
(within wp_options
table) = /home/user/public_html/wp-content/uploads
(but want it in wp
subdirecty) It turns out that when this happens there's an absolute path that needs to be updated in the database. I found this out from this post...
http://kb.enoi.se/i-can-not-upload-images-to-my-wordpress-site-after-moving-it/
In short look in the wp_options
table for and edit the row where the column name option_name
= upload_path
. Then change the option_value
from the absolute path to have the correct subdirectory path. It will be something like...
/home/username/public_html/wp-content/uploads
Change it to to have your correct subdirectory, in my case wp
..
/home/username/public_html/wp/wp-content/uploads
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.