Subdirectory WordPress Installation Guide

1. Introduction

A subdirectory installation of WordPress provides an excellent solution for people who need to operate various sites from one domain without disrupting their primary website. The installation methodology serves businesses which operate distinct blogs from their core domain the best as well as developers who explore new platform features and companies operating multi-lingual user interfaces. Fundamentally placing WordPress within your website folder structure allows you to protect your domain's organization while preserving its search engine optimization efficiency.

2. Understanding Subdirectories vs. Subdomains

When using example.com/blog/, the entire URL stays under one domain authority since this structure functions within the main website domain. Nevertheless, when using blog.example.com the search engine views this address as an independent site. Search engine optimization experts typically endorse the use of subdirectories over subdomains since subdirectories obtain authority from the main domain root while subdomains need extra optimization work.

3. Prerequisites for Installation

  • You need a web server account that enables PHP and MySQL querying.
  • cPanel access or FTP credentials.
  • A database ready for WordPress.
  • Knowledge of file management through a hosting control panel or FTP.

4. Creating the Subdirectory for WordPress

  1. Open your hosting control panel with your login credentials.
  2. Navigate to the File Manager.
  3. You should establish a new folder inside public_html which has the name 'blog'.
  4. The directory needs 755 permissions enabled to maintain accessible user rights.

5. Downloading the Latest WordPress Package

  1. Access WordPress.org to obtain the most recent software version.
  2. Extract the downloaded ZIP file.
  3. Install the extracted software in the new subdirectory through an FTP client named FileZilla.

6. Configuring a New Database

  1. The MySQL Databases section is located in cPanel after logging in.
  2. Establish a new database and make a record of its name.
  3. Develop a new database user account which receives complete access authorizations.
  4. The database credentials need storage because installation will require this information.

7. Running the WordPress Installation Wizard

  1. Your first step should be opening an internet browser and directing it to example.com/blog/.
  2. Use the language menu and select 'Continue'.
  3. Introduce the information you saved previously within the database system.
  4. Proceed by clicking 'Submit' after which select 'Run the installation'.

8. Setting Up WordPress Admin Credentials

  1. Select a special admin username followed by a powerful password.
  2. Provide a valid email address.
  3. You should choose between enabling or disabling search engine access (often needed for development sites).
  4. The installation finishes automatically after you click 'Install WordPress'.

9. Updating the .htaccess File

Modify your .htaccess file to ensure proper functioning:

RewriteEngine On
RewriteBase /blog/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /blog/index.php [L]
      

10. Altering WordPress Address and Site Address Settings

  1. Start your WordPress dashboard session through login.
  2. Navigate to Settings > General.
  3. The WordPress Address (URL) box should be set to https://example.com/blog.
  4. Set both URL addresses at the same URL for your site.
  5. Save changes.

11. Permalinks and SEO Best Practices Configuration

  1. Go to Settings > Permalinks.
  2. SEO best practices favor using the Post name structure as your permalink selection.
  3. Enable search engine crawling for your websites through the proper configuration of your robots.txt file.
  4. You should submit your new URL structure to Google Search Console.

12. Operating Themes and Plugins in a Subdirectory System

  1. Your additional website needs a design theme which matches your main site aesthetics.
  2. Activate the essential plugins Yoast SEO together with WP Super Cache and security plugins.
  3. Tests should verify whether plugins work properly with websites operating from subdirectories.

13. Installing a Unique Homepage Design for Subdirectory Websites

  1. Navigate to Settings > Reading.
  2. A static page should be selected as the homepage.
  3. Make a new homepage then select it as the front page.

14. Managing Media Uploads and Directory File Paths

  1. The correct storage of images should be verified through checks on media upload paths.
  2. Modification of fixed URLs needs to be performed throughout theme files and website content.
  3. The Velvet Blues plugin helps you to replace outdated URLs in your website.

15. Security Improvements for the Subdirectory Installation

  1. Options -Indexes
  2. WordFence security plugins should be added to the website while disabling directory browsing through WordFence.

16. Performance Optimization for a Subdirectory Installation

  1. Enable caching using WP Rocket.
  2. Your website should use a content delivery network (CDN) because it will offer quicker content distribution.
  3. Optimize database tables with WP-Optimize.

17. Troubleshooting Common Issues

  1. 404 Errors: Resave permalinks in Settings > Permalinks.
  2. The correct setup of both wp-config.php and .htaccess files should be evaluated to prevent redirect loops.
  3. The 'Really Simple SSL' plugin should be used to resolve SSL Mixed Content Issues.

18. The Process to Move a WordPress Site to Operate from a Subdirectory

  1. Backup your existing site.
  2. Move files to the subdirectory.
  3. Change the site URL through phpMyAdmin database interface.
  4. You should use .htaccess rules for URL redirecting old links.

19. Testing and Verifying Installation Success

  1. Check site performance.
  2. Run security scans.
  3. The system needs to connect with the primary domain page.

20. Conclusion

Subdirectory WordPress installation helps users achieve system organization and supports Search Engine Optimization benefits simultaneously. Use this guide to install WordPress perfectly along with methods to prevent standard installation issues and maximize system performance.

case studies

See More Case Studies