You can’t. The simple reason is that wp-content
doesn’t even have to exist, and if it exists, it might not be writable.
On systems with an automatic deployment and rollbacks, the upload directory is usually completely separated from the WordPress directory, and you cannot create a new directory on the same level.
Summary: If you need a writable directory, you have to use one inside of the existing upload directory. That’s the only place where you can expect write access.
Related Posts:
- Change upload directory for PDF files
- Disable to create folders for every years and months in uploads folder
- more than one upload directory?
- WordPress in a sub directory but not images
- Impossible to index an upload folder with 10k files
- Upload an image at frontend > Create direction and/or rename filename possible?
- Downloadable content file structure
- PHP – Move a file into a different folder on the server
- Compare 2 directories in windows
- get_template_directory() vs bloginfo( ‘template_directory’ ) vs TEMPLATEPATH
- Rename UPLOADS folder with custom WP_CONTENT_DIR
- How do I serve static content on same domain as WordPress
- Can I change get_template_directory_uri()?
- How to get WordPress to save upload file beyond web root [closed]
- How to set custom upload directory per user after moving content directory
- Custom Post Type Archive in Sub Folder
- How to point my domain to a WordPress install in a sub-directory?
- Can I put my WordPress theme files in another folder?
- Multiple domains for multiple single installs
- How to Create Hierarchical Directory for Nation Wide Mental Health Services
- How do I set up single sign on for multiple WP installs across the same domain?
- Why doesn’t WP_PLUGIN_DIR definition use DIRECTORY_SEPARATOR?
- How to copy one folder to another folder recursively
- issues including a file from a plugin directory
- local folder permissions vs chown — security considerations
- How is a student directory best handled in WordPress?
- Creating directory in uploads: mkdir vs wp_mkdir_p
- How would you detect if WordPress is installed in a subdirectory (not root)?
- Saving WordPress generated thumbnails in a subdirectory
- Two identical wp-includes directories on server
- What is the recommend directory in which I can upload a new library?
- Second wordpress installation on subdirectory
- Install theme on multiple domains
- how to create a folder in wordpress
- Right permissions to WordPress directory
- How can I have nginx serve WordPress at /blog?
- 2 WordPress sites in 2 sibling folders on one domain
- Missing a temporary folder.error when image is uploaded in admin Set temporary Directory – WordPress 5.2.2
- move_uploaded_file() not working on wordpress front end
- Move files from flat upload directory to organised by year / month
- Auto-create a post with last 10 images in WordPress directory
- Copy Folder to another Folder using WP Filesystem
- Unable to update WordPress or install plugins/themes
- Session Expired when WordPress Address (URL) and Site Address (URL) are different
- After changing wp from subdirectory to root I can’t preview any changes to a page or post
- Moved WordPress site to new server, directory permissions not working correctly
- Moving from one test to multiple final environments
- Should I install blog on subdomain or subdirectory?
- Hiding Directory Path
- Should custom directories be created under the wp-content directory?
- Use of Folders within WordPress
- Hosting my WordPress site out of a subdirectory
- Theme file structure best practice
- What is wp-admin/meta for?
- google xml sitemap won’t work on directory install
- How can i shift my chosen posts to a subdirectory?
- how to change wp upload directory to another domain directory
- How to share /uploads/ directory with another site on the same server?
- Where to put robot.txt and sitemap.xml for wordpress installed in its own directory
- How to disable directory files from accessing?
- Move WordPress from Root to Subfolder
- Anybody knows if i could upload a leaflet or openlayers3 map to wordpress webpage?
- WordPress not handling subdirectory properly
- Wp-CLI not working with WordPress installed with composer
- Does WordPress refer to any files outside of the main install folder (and database)?
- WordPress File Structure
- Getting Internal server in sub folder pages
- Moving wordpress from /dir to main folder
- Giving WordPress Its Own Directory together with index.html
- Trying to setup a dev subdomain, but url loads as /dev/ instead
- Want to change my site root
- Best way to transfer WordPress install to root of directory when I’m ready to launch?
- Is there a way to create folders restricted to specific users to open?
- add 360 (non-WordPress) tours in a subfolder with the same name as the main (WordPress)page of the 360 tours
- WordPress page for one specific page on Google Cloud hosted website?
- WordPress Bedrock breaking plugin links
- Editing Listings in a Business Directory
- Bedrock WordPress retro-porting to standard WP installation: is this allowed?
- I need advice for creating native WordPress directory site based on native WordPress functionality only
- How to Install WP to Subdomain but Serve on Subdirectory?
- Change the WordPress files structure
- WordPress makes 404 error when going to domain folder
- Moving wp-config.php when you have a second wordpress install
- Using same root header in subfolder wp blog – Header disapears on Single Posts
- How use custom upload directories in filesystem and url based on media type or category
- How do I get WP site to show in both root and sub-directory
- How to replace a wordpress installation in root directory with another in a subdirectory?
- Move WordPress with changed name ‘wp-content’
- Create Subfolder that always displays template file
- FTPS Uploads – wp-content cannot be found
- Primary site file uploads failing, subdirectory subsites upload fine
- Index (Home) page not displayed when running wordpress in a subdirectory
- How do you create a development site into a subdirectory of the live site?
- Media Upload Directory to MMYY instead of YYYY/MM
- Hide/Remove Wp Directory /wp-content/uploads/
- Correct Syntax for uploading files to custom directory in WordPress
- Moving wordpress from TLD to sub-folder (URL structure only)
- @font-face Paths Don’t Seem to be working properly
- Question regarding the file path for media_sideload_image and wp_upload_dir()
- Multisite Sub-directories Installation