WordPress has a built-in setting for this that can be set in the Settings > Permalinks screen.
Choose “Custom Structure” and add in your desired prefix/subdirectory at the start of that input field with a slash after it.
/subdirectory/%postname%
Related Posts:
- How would you detect if WordPress is installed in a subdirectory (not root)?
- Second wordpress installation on subdirectory
- Subdomain redirects to subdirectory [closed]
- After changing wp from subdirectory to root I can’t preview any changes to a page or post
- Should I install blog on subdomain or subdirectory?
- wordpress sub-directory sites on a sub-domain?
- Trying to setup a dev subdomain, but url loads as /dev/ instead
- WordPress page for one specific page on Google Cloud hosted website?
- How to Install WP to Subdomain but Serve on Subdirectory?
- 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
- Change upload directory for PDF files
- What’s the purpose of index.php in wp-content directory? [duplicate]
- How do I serve static content on same domain as WordPress
- Can I change get_template_directory_uri()?
- Site redirects to wrong url when saving settings
- Multisite installation combining subdomains and subdirectories
- 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
- Sub-domain or 2nd, temporary different domain?
- 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
- Disable to create folders for every years and months in uploads folder
- local folder permissions vs chown — security considerations
- How is a student directory best handled in WordPress?
- On WordPress Network(multisite), Sub Blogs in Subdirectories or Subdomains? What’s better?
- Two identical wp-includes directories on server
- What is the recommend directory in which I can upload a new library?
- Install theme on multiple domains
- Change multi-site installation from sub-domains to sub-directories
- how to create a folder in wordpress
- Right permissions to WordPress directory
- Multiple wordpress installations that shares WordPress & Theme but with separated database
- How can I have nginx serve WordPress at /blog?
- Prevent WordPress from interpreting a subfolder?
- Mapping Subdomains in WordPress to give the appearance of a localised site, best approach?
- 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
- One Domain, Two Installs of WordPress
- Two WordPress installations: One in root and one in sub directory – no images in subdir installation [closed]
- Moving from one test to multiple final environments
- WordPress in a sub directory but not images
- Hiding Directory Path
- Moving WP from /blog to root directory
- Folder keeps popping up in my public_html directory and overriding WordPress page structure
- Hosting my WordPress site out of a subdirectory
- How to redirect the frontend of a WordPress site (only)?
- Theme file structure best practice
- Clean installation missing its /wp-content folder
- Path in dev server works; same path in prod server is broken
- What is wp-admin/meta for?
- What plugins create a directory on the root directory of WordPress? [closed]
- Where to put robot.txt and sitemap.xml for wordpress installed in its own directory
- Automating WP application directory creation (domain name passed as a variable argument)
- Move WordPress from Root to Subfolder
- WordPress not handling subdirectory properly
- Wp-CLI not working with WordPress installed with composer
- WordPress File Structure
- Impossible to index an upload folder with 10k files
- Moving wordpress from /dir to main folder
- Giving WordPress Its Own Directory together with index.html
- Upload an image at frontend > Create direction and/or rename filename possible?
- Moving from subdirectory and subdomain -> root
- Want to change my site root
- Best way to transfer WordPress install to root of directory when I’m ready to launch?
- How to redirect template_directory to subdomain relativ url?
- How to move a WordPress installation to a subdirectory
- 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 hosted on subfolder of domain causing customizer to constantly refresh and is requesting jquery from root domain
- WordPress Bedrock breaking plugin links
- How to Best Create Separate Subscribers and User Experience
- Error in the paths of one of the plugins when changing the plugin directory
- Serve WordPress site as root domain with WordPress files in subdirectory in nginx server
- Editing Listings in a Business Directory
- I need advice for creating native WordPress directory site based on native WordPress functionality only
- Rrestrict access to static pages if user is not logged in
- Sub-directory domain on subdomain multisite?
- Moving wp-config.php when you have a second wordpress install
- WordPress Multisite subdomains and sharing the same upload folder
- How do I get WP site to show in both root and sub-directory
- Create Subfolder that always displays template file
- Subdirectory and domain multisite installation
- 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?
- The right way to go about creating a WordPress site from a static site which has WordPress installs in its subdirectory
- Plugin could not be deleted due to an error: Unable to locate WordPress Plugin directory
- Moving wordpress from TLD to sub-folder (URL structure only)
- @font-face Paths Don’t Seem to be working properly
- Could moving my WordPress installation from /var/www/html/ to /var/www/ break the application?
- WordPress multisite with subdomains behind nginx reverse proxy using subdirectories
- unabled to link all the pages