How to Create a Directory in WordPress
Step-by-Step Guide to Safely Creating Folders on Your WordPress Server
Need a place to store downloads, custom scripts, or other assets for your WordPress site, but not sure how to create a new folder on your server? It’s normal to feel nervous about touching anything outside the WordPress dashboard—one wrong move in the file system can take your site offline.
The good news is that creating a directory (folder) for WordPress is straightforward when you do it in the right location and with the right tools. In this guide, you’ll learn how to create a directory safely using cPanel File Manager, an FTP (or SFTP) client, and SSH/WP-CLI, so your site stays online and secure—no matter which theme (including Jannah) or editor you use.
If you’re completely new to WordPress, you may want to skim our WordPress guides and tutorials overview first, then come back here when you’re ready to work with your hosting account.
Prerequisites
Before you create a directory for your WordPress site, make sure you have the basics in place. You don’t need to be a developer, but you should be comfortable logging into your hosting account.
- An existing WordPress site installed on your hosting account.
- Login access to your hosting control panel (often cPanel or a similar interface).
- (Optional) FTP/SFTP credentials from your host (hostname, username, password, port).
- (Optional) SSH access if you plan to use WP-CLI or command-line tools.
- A recent backup of your site files and database, in case you need to roll back.
Step 1: Understand the WordPress Directory Structure
Before you create a directory, you need to know where WordPress keeps its core files and where it’s safe to add your own folders. Almost all WordPress installations share the same basic structure in the site’s root (often public_html or a subfolder):
wp-admin/– Core admin dashboard files (do not modify).wp-includes/– Core WordPress libraries (do not modify).wp-content/– Themes, plugins, uploads, and other custom assets.wp-content/themes/– Your theme and child theme directories.wp-content/plugins/– Your plugin directories.wp-content/uploads/– Media uploads managed by WordPress.
In most cases, you should create new directories inside wp-content/, because that’s where WordPress expects non-core files to live. For example, you might create wp-content/custom-downloads/ or wp-content/my-scripts/ for custom assets.
wp-admin or wp-includes unless you know exactly what you’re doing. Changing these core folders can break your WordPress installation. Step 2: Create a Directory with cPanel File Manager
Using cPanel’s File Manager is often the simplest way to create a directory for your WordPress site. Everything happens in your browser—no extra software required.
- Log in to your hosting control panel.
Open your host’s dashboard and click into cPanel (or the equivalent file manager interface). - Open File Manager.
In cPanel, click File Manager. A new tab will open showing your server’s files. - Locate your WordPress root folder.
This is commonlypublic_html, but it might also be a subdirectory likepublic_html/blogorexample.com/public, depending on your host. - Navigate to the safe area for new directories.
Double-click into your WordPress folder, then intowp-content/. Decide where your folder should live (for example, directly insidewp-content/or insidewp-content/uploads/). - Create the new folder.
Click the + Folder button (top menu in File Manager). A pop-up will ask for the folder name and location. - Name your directory.
Use lowercase letters, numbers, and hyphens or underscores (no spaces). Examples:custom-downloadslanding-page-assetstracking-scripts
- Confirm the path.
Make sure the path is correct (for example,/public_html/wp-content/custom-downloads), then click Create New Folder. - Verify your directory.
In the left folder tree, you should now see your new folder listed underwp-content/. Click it to confirm it’s empty and ready to use.
wp-content/downloads/ebooks/ or wp-content/downloads/plugins/ so everything stays grouped logically over time. Step 3: Create a Directory via FTP or SFTP
If your host doesn’t offer cPanel, or you prefer to manage files from your desktop, you can create directories using an FTP or SFTP client (such as FileZilla or Cyberduck). This is especially useful for developers or agencies managing many sites.
Not sure which program to use? Check out the best FTP clients for WordPress users to pick a tool that fits your workflow and operating system.
- Gather your FTP/SFTP credentials.
You’ll need:- Server/host name (e.g.,
ftp.yoursite.comor your server IP). - Username and password (provided by your host).
- Port (21 for FTP, 22 for SFTP, unless your host specifies otherwise).
- Server/host name (e.g.,
- Connect to your server.
Open your FTP client, create a new connection using the credentials above, and connect to the server. - Navigate to your WordPress directory.
In the remote site panel, browse to your site’s root folder (for example,/public_htmlor/sites/example.com), then intowp-content/. - Create the new directory.
Right-click insidewp-content/(or your chosen location) and select Create directory or Create folder. Enter a descriptive name, such ascustom-downloads, and confirm. - Check permissions.
Many FTP clients let you view permissions by right-clicking the folder and choosing File permissions. Typical directories use755permissions; your host may enforce this automatically. - Test the directory.
Upload a small test file (liketest.txt) into the new folder to confirm you can read and write to it. You can later delete this test file.
Step 4: Create a Directory Using SSH and WP-CLI (Advanced)
If you’re comfortable with the command line, creating directories via SSH is faster and easier to automate. While WP-CLI itself doesn’t have a dedicated “create directory” command, you can use standard shell commands alongside WP-CLI for advanced workflows.
- Connect to your server via SSH.
Use an SSH client (like Terminal on macOS/Linux or PuTTY on Windows) and connect with the SSH credentials from your host. - Change to your WordPress root folder.
Run something like:cd /home/username/public_htmlAdjust the path to match where WordPress is installed on your server.
- Create the directory inside wp-content.
mkdir wp-content/custom-downloadsReplace
custom-downloadswith a name that matches how you plan to use the folder. - Set appropriate permissions.
chmod 755 wp-content/custom-downloadsThis is a common permission setting for directories on Linux-based web servers.
- Verify the directory.
ls -ld wp-content/custom-downloadsYou should see a line showing the folder, its permissions, and its owner.
pwd before running commands like mkdir or rm. A typo in the path can create folders in the wrong location—or delete the wrong files. Step 5: Use Your New Directory Safely in WordPress
Creating the directory is only half the job. You also need to use it in a way that keeps your site organized, fast, and secure.
Common safe uses for a custom directory include:
- Storing downloadable assets (PDFs, ZIP files, documentation) for your visitors.
- Keeping custom scripts or tracking pixels separate from your theme files.
- Saving logs or exports generated by a plugin that lets you choose a directory.
If your directory will be accessible from the web, you should disable automatic directory listing so visitors can’t see a raw list of every file inside. On Apache-based servers, you can do this by adding a small .htaccess file inside the folder:
Options -Indexes For folders that should never be publicly accessible (for example, log files or temporary exports), your developer or host can apply stricter rules, such as blocking all direct access to that directory.
Once you’re confident your directory is set up correctly, consider reviewing your broader security posture. A good starting point is to follow a dedicated hardening checklist to help you secure your WordPress website beyond just file management.
Confidently Creating Directories in WordPress
Creating a new directory for your WordPress site doesn’t have to be risky or confusing. By working inside wp-content/, using tools like cPanel File Manager, FTP/SFTP, or SSH, and keeping clear naming conventions, you can keep your custom files organized without touching fragile core folders.
As you build out more features—whether it’s a download library, custom scripts, or plugin exports—use these same principles: work in the right location, keep backups, and test changes on a staging site before rolling them out to your live WordPress installation.
Further Reading
- How to Edit WordPress Files Safely
- WordPress Hosting Explained
- Best WordPress Backup Plugins
- How to Create a WordPress Staging Site
Frequently Asked Questions
Can I create a directory directly from the WordPress dashboard?
Why do I get a 403 Forbidden error when accessing my new directory?
.htaccess rule that denies access. Start by confirming the directory permissions are set to a typical value like 755, then check any .htaccess files in the folder and its parent directories. If the issue persists, contact your host’s support—some providers block certain paths for security reasons. Is it safe to create directories in wp-admin or wp-includes?
wp-admin and wp-includes directories are part of WordPress core, and adding custom folders there can cause conflicts during updates or introduce security risks. Always place your custom directories in wp-content/ (or within themes/plugins that are designed to handle them). That way, your changes are less likely to be overwritten and easier to manage over time. Where is the best place to create custom directories in WordPress?
wp-content/, because that’s where WordPress expects custom code, media, and plugin data. If the folder is tied to a specific theme or plugin, you might put it inside that theme’s or plugin’s directory. For general assets like downloads, a path such as wp-content/downloads/ keeps things tidy and separate from core files.



