Skip to contentSkip to main navigation Skip to footer

How to Add Files to “Hide WordPress Common Files”

Understanding the Goal

You want to hide additional common WordPress files, specifically wp-cron.php, using the Hide My WP Ghost plugin. This is accomplished by adding a filter to modify the list of files to be hidden.


Adding the Filter in WordPress

You need to add a filter to either the functions.php file of your active theme or the wp-config.php file. This filter will modify the hidden files list.

Option A: Editing functions.php

  1. Navigate to your WordPress admin dashboard.
  2. Go to Appearance > Theme File Editor.
  3. Select the functions.php file from the right-hand side menu.
  4. Add the following code at the end of the functions.php file
add_filter('hmwp_hide_commonfiles_files', function($files){
  $files[] = 'wp-cron.php';
  return $files;
});

Option B: Editing wp-config.php

  1. Access your WordPress site’s root directory via FTP or your hosting control panel’s file manager.
  2. Open the wp-config.php file for editing.
  3. Add the following code at the end of the wp-config.php file
add_filter('hmwp_hide_commonfiles_files', function($files){
  $files[] = 'wp-cron.php';
  return $files;
});

Adding Multiple Files

If you want to hide additional files such as wp-trackback.php and xmlrpc.php, you can modify the code as follows:

add_filter('hmwp_hide_commonfiles_files', function($files){
    $files[] = 'wp-cron.php';
    $files[] = 'wp-trackback.php';
    $files[] = 'xmlrpc.php';
    return $files;
});

Hiding the File in Hide My WP Ghost

After adding the filter, you need to select the file and save the settings in the Hide My WP Ghost to apply the changes.

  1. Navigate to the Hide My WP > Change Paths > WP Core Security > Hide WordPress Common Files.
  2. Select the file from the list, in our case is wp-cron.php file
  3. Click the Save Settings button to ensure the file is hidden.

Note! For Nginx server, you need to restart the Nginx service after saving the settings in Hide My WP Ghost plugin.


Important

  • Avoid Breaking Functionality: Be careful not to hide files that are essential for WordPress functionality. For instance, hiding xmlrpc.php can prevent remote publishing and applications that use XML-RPC from functioning correctly.
  • Testing: After adding the filter, thoroughly test your website to ensure it continues to function as expected. Check for any broken features or errors.

By following this tutorial, you can easily extend the functionality of the Hide My WP Ghost plugin to hide additional files, increasing your WordPress site’s security.

Always test your changes and avoid hiding critical WordPress files to maintain the site’s functionality.

How to Remove the Sitemap Author in WordPress

Why Remove the Sitemap Author?

The sitemap author provides information about who created the sitemap. While this might seem harmless, it can reveal that your site is powered by WordPress, making it a target for theme detectors and hackers.

Additionally, the sitemap author does not contribute to SEO, so removing it won’t negatively impact your site’s search engine performance.


Step-by-Step Guide

  1. In your WordPress dashboard, navigate to Hide My WP > Tweaks > Feed & Sitemap.
  2. Activate the option Change Paths in Sitemaps XML to load the support for Sitemap in Hide My WP Ghost.
  3. Now, activate the Remove the sitemap style & author name option.

Activating Remove the sitemap style & author name removes the sitemap style and author name and loads the standard view of the sitemap.

Activating Change Paths in Sitemaps XML changes the image paths in the Sitemap XML This ensures that Google indexes the new image paths, enhancing your site’s security without affecting your SEO.

After making the necessary adjustments, scroll down and click Save Changes to apply the new settings.

Hide My WP Ghost with WP Security Ninja

Introduction

WordPress, powering over 43% of all websites globally, remains a prime target for bot attacks. WordPress security plugins offer essential features like malware scanning, firewall protection, and login security to secure websites from malicious activities. Hide My WP Ghost and WP Security Ninja are two such plugins that provide a robust defense against potential threats, ensuring the smooth operation of your website.


WP Security Ninja

WP Security Ninja has carved a niche for itself in the WordPress security ecosystem. It provides a broad spectrum of security features designed to protect your website from a variety of threats.

Key Features of WP Security Ninja

  • Malware Scanning: WP Security Ninja performs comprehensive scans to detect malware, vulnerabilities, and suspicious code. It ensures your website is free from harmful elements that can compromise its functionality.
  • Firewall Protection: The plugin includes a powerful firewall that blocks malicious traffic, preventing unauthorized access to your website.
  • Security Checks: WP Security Ninja runs over 50 security tests to identify potential vulnerabilities. It checks for issues such as outdated plugins, weak passwords, and open ports.
  • Automatic Updates: Keeping your WordPress core, themes, and plugins updated is crucial for security. WP Security Ninja offers automatic updates to ensure your website is always running the latest, most secure versions.
  • Brute Force Protection: This feature limits login attempts, thwarting hackers who use brute force methods to gain access to your website.

Hide My WP Ghost

Hide My WP Ghost, while complementing the features offered by WP Security Ninja, brings a unique set of additional capabilities that enhance your website’s security posture.

Key Features of Hide My WP Ghost

  • Two-Factor Authentication (2FA): This feature adds an extra layer of security by requiring users to verify their identity through a second method, such as a mobile app or email, in addition to their password.
  • Temporary Login: Hide My WP Ghost allows for the creation of temporary login links. This is particularly useful for granting temporary access to developers or guest authors without sharing permanent login credentials.
  • Magic Link Login: Allows users to log in with a secure link sent to their email.
  • 8G Firewall: The 8G Firewall is a robust security measure designed to block a wide range of malicious requests and attacks. It operates at the server level, offering a high degree of protection against various types of threats.
  • Country Blocking: This feature enables you to restrict access to your website from specific countries. By blocking traffic from regions known for high levels of cyber-attacks, you can significantly reduce the risk of unauthorized access.
  • Header Security: Hide My WP Ghost enhances your website’s security by securing HTTP headers. This helps protect against attacks such as cross-site scripting (XSS) and clickjacking.
  • Customizable and Hidden WP Paths: By changing default WordPress paths and hiding them, Hide My WP Ghost makes it more difficult for hackers to identify your site as a WordPress site, thus reducing the likelihood of targeted attacks. This is the most efficient way to protect vulnerable themes and plugins.
  • Brute Force Protection: This feature limits login attempts, thwarting hackers who use brute force methods to gain access to your website.

Using Hide My WP Ghost and WP Security Ninja Together

Integrating WP Security Ninja and Hide My WP Ghost is a simple process, and both plugins can be installed and configured through the WordPress dashboard.

Here’s a step-by-step guide to leverage the combined power of these plugins:

  • Install and configure WP Security Ninja: Configure the settings to enable malware scanning, firewall protection, and run a security check to fix the security tasks.
  • Install and configure Hide My WP Ghost: Go through the setup to customize and hide the WP common paths, configure two-factor authentication, 8G Firewall, brute force protection, country blocking, header security, and more.
  • Monitor and Maintain: Regularly check the security logs and alerts from both plugins. Ensure that your WordPress core, themes, and plugins remain updated. Periodically review and adjust the settings in both plugins to adapt to emerging threats and changing website requirements.

Conclusion

By implementing both plugins, you can create a multi-layered security strategy that secures your website from existing vulnerabilities and most threats. Regular monitoring and maintenance ensure that your site remains secure, providing peace of mind and allowing you to focus on growing your online presence.

How To Implementing Website Security Headers

What are Security Headers?

Security headers are directives included in the HTTP responses from web servers that instruct the web browser on how to handle the content of a web page.

These headers help protect web applications from various security threats by mitigating risks associated with cross-site scripting (XSS), cross-site request forgery (CSRF), clickjacking, and other common vulnerabilities.

By setting security policies at the browser level, these headers provide an additional layer of defense against potential attacks.

How to add security headers using Hide My WP Ghost plugin.


Strict-Transport-Security (HSTS)

The Strict-Transport-Security (HSTS) header ensures that a web application is accessed only over HTTPS, preventing man-in-the-middle attacks and cookie hijacking.

Implementation

To implement HSTS, add the following header to your HTTP response:

Strict-Transport-Security: max-age=31536000; includeSubDomains; preload

Details

  • max-age=31536000: Specifies the duration (in seconds) that the browser should remember to only access the site via HTTPS.
  • includeSubDomains: Applies the rule to all subdomains.
  • preload: Requests inclusion in the HSTS preload list, a list of sites hardcoded into browsers as HTTPS-only.

Content-Security-Policy (CSP)

The Content-Security-Policy (CSP) header helps prevent cross-site scripting (XSS), clickjacking, and other code injection attacks by specifying which sources of content are allowed to be loaded on the site.

Implementation

A typical CSP header might look like this:

Content-Security-Policy: default-src 'self'; script-src 'self' https://apis.google.com

Details

  • default-src 'self': Only allows resources from the site’s own origin.
  • script-src 'self' https://apis.google.com: Allows scripts from the site’s own origin and Google’s APIs.

X-Frame-Options

The X-Frame-Options header prevents clickjacking attacks by controlling whether a browser should be allowed to render a page in a <frame>, <iframe>, <embed>, or <object>.

Implementation

To implement, add one of the following headers:

X-Frame-Options: DENY

or

X-Frame-Options: SAMEORIGIN

Details

  • DENY: Prevents the page from being framed.
  • SAMEORIGIN: Allows framing only by the same origin.

X-XSS-Protection

The X-XSS-Protection header enables the cross-site scripting (XSS) filter built into most modern web browsers, providing a basic level of protection against XSS attacks.

Implementation

Add the following header:

X-XSS-Protection: 1; mode=block

Details

  • 1: Enables the XSS filter.
  • mode=block: Instructs the browser to block the page if an XSS attack is detected.

X-Content-Type-Options

The X-Content-Type-Options header prevents browsers from interpreting files as a different MIME type than what is specified, which can help mitigate drive-by download attacks.

Implementation

Add the following header:

X-Content-Type-Options: nosniff

Details

  • nosniff: Ensures the browser adheres to the MIME types specified in the Content-Type headers.

Cross-Origin-Embedder-Policy (COEP)

The Cross-Origin-Embedder-Policy header ensures that a document can only load resources that explicitly grant permission, enhancing the security of embedded content.

Implementation

Add the following header:

Cross-Origin-Embedder-Policy: require-corp

Details

  • require-corp: Requires cross-origin resources to explicitly grant permission using the Cross-Origin-Resource-Policy header.

Cross-Origin-Opener-Policy (COOP)

The Cross-Origin-Opener-Policy header helps protect against cross-origin attacks, such as cross-origin information leaks, by ensuring that a top-level document does not share a browsing context group with cross-origin documents.

Implementation

Add the following header:

Cross-Origin-Opener-Policy: same-origin

Details

  • same-origin: Ensures the document is isolated from other origins, reducing the risk of cross-origin attacks.

Regularly reviewing and updating these headers in response to new security threats is also crucial in maintaining robust security.

How to Set Up Hide My WP Ghost in Safe Mode in 3 Minutes

This video shows how to set up Hide My WP Ghost in Safe Mode with custom login and setup – in just 3 minutes!

NOTE: The plugin was configured on an Apache Server. Certain manual actions are required to configure Hide My WP Ghost on Nginx and IIS servers.

VIDEO OUTLINE

  1. Min. 00.04- 1.01: Select and Save SAFE Mode
  2. Min. 1.02 – 2.31: Change Paths Settings
  3. Min. 2.32 – 2.57: Run New Frontend Login Test
  4. Min. 2.58 – 3.28 : View Changes

Select SAFE Mode and Save Settings

👉Min. 00.04- 1.01

Recommended Actions:

  • Select Safe Mode
  • A pop-up will appear showing you all the predefined paths that Hide My WP Ghost sets in Safe Mode. READ the info.
  • Click on Continue, and then SAVE.
  • Run the Frontend Login test. 
  • SAVE your login URL (!very important that you do this)
  • SAVE your SAFE URL (!also very important, you’ll need this in case you can’t login)
  • If the test is successful, click on Yes, it’s working.

Change Paths Settings

👉 Min. 1.02 – 2.31

Admin Security

  • Custom Admin Path – Recommended action: Leave as is
  • Hide wp-admin – Recommended: ON 
  • Hide wp-admin From Non-Admin users – Recommended: OFF

Login Security

  • Custom Login Path – Recommended action: Customize
  • Hide wp-login.php – Recommended: ON 
  • Hide login Path – Recommended: ON
  • Custom Lost Password Path – Recommended action: Leave as is
  • Custom Register Path – Recommended action: Leave as is
  • Custom Logout Path – Recommended action: Leave as is

Ajax Security

  • Custom admin-ajax Path – Recommended action: Customize
  • Hide wp-admin from Ajax URL – Recommended: ON
  • Change Paths in Ajax Calls – Recommended: ON

User Security

  • Custom Author Path – Recommended action: Leave as is
  • Hide Author ID URL – Recommended: ON

WP Core Security

  • Custom wp-content Path – Recommended action: Leave as is
  • Custom wp-includes Path – Recommended action: Leave as is
  • Custom uploads Path – Recommended action: Leave as is
  • Custom comment Path – Recommended action: Leave as is
  • Hide WordPress Common Paths – Recommended: ON
  • Hide File Extensions – Recommended action: Leave as is
  • Hide WordPress Common Files – Recommended: ON
  • Hide Common Files – Recommended Action: ADD wp-comments-post.php
  • Disable Directory Browsing – Recommended: OFF

Plugins Security

  • Custom plugins Path – Recommended action: Leave as is
  • Hide Plugin Names – Recommended: ON
  • Hide All the Plugins – Recommended: OFF
  • Hide WordPress Old Plugins Path – Recommended: ON
  • Show Advanced Options– Recommended: OFF

Themes Security

  • Custom themes Path – Recommended action: Leave as is
  • Hide Theme Names – Recommended: ON
  • Hide WordPress Old Themes Path – Recommended: ON
  • Custom theme style name – Recommended action: Leave as is
  • Show Advanced Options – Recommended: OFF

API Security

  • Custom wp-json Path – Recommended action: Leave as is
  • Hide REST API URL link – Recommended: ON
  • Disable REST API access – Recommended: OFF
  • Disable XML-RPC access – Recommended: ON
  • Disable RSD Endpoint from XML- RPC – Recommended: ON

Firewall and Headers

  • Add Security Headers for XSS and Code Injection Attacks – Recommended: ON
  • Strict-Transport-Security – Recommended: ACTIVE, leave as is
  • Content-Security-Policy – Recommended: ACTIVE, leave as is
  • X-XSS- Protection – Recommended: ACTIVE, leave as is
  • X-Content-Type- Options – Recommended: ACTIVE, leave as is
  • Cross-Origin-Embedder- Policy – Recommended action: ADD then leave as is
  • Cross-Origin-Opener-Policy – Recommended action: ADD then leave as is
  • X-Frame-Options – Recommended action: ADD then leave as is
  • Remove Unsafe Headers – Recommended: ON
  • Block Theme Detectors Crawlers – Recommended: ON
  • Firewall Against Script Injection – Recommended: ON

Run New Frontend Login Test

👉 Min. 2.32 – 2.57

Recommended Actions:

  • After you save the new settings, Run a new Frontend Login test.
  • SAVE your NEW login URL (!very important that you do this)
  • SAVE your SAFE URL (!also very important, you’ll need this in case you can’t login)
  • If the test is successful, click on Yes, it’s working.

View Changes

👉 Min. 2.58 – 3.28

Recommended Actions: 

  • Click on Visit Site to see the changes you’ve enabled using Hide My Ghost take effect.
  • Take a look at your site’s source code to see the modified paths.

👋Note! The settings shown in this video will work best for most sites – and present a way to quickly, safely, and effectively set up SAFE Mode to increase your site’s protection.

However, the ideal settings can look different from case to case, and you can always further customize these settings based on your needs and wants.

We advise you to always read the documentation that we link to from within the plugin and ensure you clearly understand what each setting enables you to do.

How to Activate WordPress Debugging

Debugging is an essential process for identifying and fixing issues in WordPress. Activating debugging mode in WordPress provides detailed error messages and logs that can help diagnose problems. Here’s a step-by-step guide on how to enable debugging in WordPress:


Step 1: Access Your wp-config.php File

The wp-config.php file is located in the root directory of your WordPress installation. This file contains configuration settings for your WordPress site.

  1. Connect to Your Server: Use an FTP client or your web hosting file manager to access your WordPress files.
  2. Locate the wp-config.php File: Navigate to the root directory of your WordPress installation, where the wp-config.php file is located.

Step 2: Edit the wp-config.php File

To activate debugging, you need to edit the wp-config.php file and add or modify certain lines of code.

  1. Open the wp-config.php File: Open the file in a text editor.
  2. Add Debugging Code: Look for the line that says /* That's all, stop editing! Happy blogging. */. Just above this line, add or modify the following lines of code:
// Enable WP_DEBUG mode
define( 'WP_DEBUG', true );

// Enable Debug logging to the /wp-content/debug.log file
define( 'WP_DEBUG_LOG', true );

// Disable display of errors and warnings 
define( 'WP_DEBUG_DISPLAY', false );
@ini_set( 'display_errors', 0 );

// Use dev versions of core JS and CSS files (only needed if you are modifying these files)
define( 'SCRIPT_DEBUG', true );

Explanation of the Code

  • WP_DEBUG: This constant enables the debugging mode. Setting it to true activates debugging throughout your WordPress site.
  • WP_DEBUG_LOG: This constant allows logging of errors to a debug.log file within the wp-content directory. This is useful for reviewing errors at a later time.
  • WP_DEBUG_DISPLAY: By default, debugging information is displayed within the HTML of your pages. Setting this to false prevents this information from being shown on your site. The @ini_set line further ensures that errors are not displayed.
  • SCRIPT_DEBUG: This constant forces WordPress to use the non-minified versions of core JavaScript and CSS files. This is helpful if you are making changes to these files.

Step 3: Save and Upload the File

After adding the debugging code, save the wp-config.php file and upload it back to your server if you edited it locally.


Step 4: Review the Debug Log

When WP_DEBUG and WP_DEBUG_LOG are enabled, WordPress will log errors and warnings to a file named debug.log located in the wp-content directory. You can access and review this file to understand what issues are occurring on your site.

  1. Navigate to wp-content: Go to the wp-content directory in your WordPress installation.
  2. Open debug.log: Open the debug.log file to see the list of errors and warnings logged by WordPress.

Activating WordPress debugging is a straightforward process that involves editing the wp-config.php file and adding specific constants. This enables detailed logging of errors, which is crucial for troubleshooting and resolving issues on your WordPress site. Remember to disable debugging mode once you have finished troubleshooting to prevent potential security risks.

How To Change File Permissions in WordPress

Why Are File Permissions Important in WordPress?

File permissions are a crucial aspect of website security. They determine who can access, modify, or delete files and directories on your server. Properly configured permissions help safeguard your WordPress site against unauthorized access and malicious activities. Here’s why they matter:

  1. Security: Incorrect permissions can expose sensitive files, making your site vulnerable to attacks. By setting appropriate permissions, you limit access to authorized users only.
  2. Protection Against Exploits: Some plugins, themes, or poorly coded scripts may have vulnerabilities. Proper permissions prevent these from being exploited by malicious actors.
  3. Data Integrity: Correct permissions ensure that critical files (such as configuration files) remain unchanged. Unauthorized modifications could lead to site malfunction.
  4. User Isolation: Different users (e.g., web server, FTP user, WordPress admin) require varying levels of access. Permissions allow you to isolate user roles effectively.

Changing File Permissions Using Plugin

Since Hide My WP Ghost 7.3 fixing file permission is one click away. When you run a Security Check in Hide My WP Ghost, if there are any file permission issues, you have the option to fix them right away.

Click to fix it and select if you want a complete fix of all directories, files and config files or just the main directories.

The default permissions chmod are:

  • Directories – 0755
  • Files – 0644
  • Config Files – 0444

After the fix, run the security check again and make sure all security tasks are completed.


Changing File Permissions Using FTP

FTP (File Transfer Protocol) is a widely used method for managing files on a web server. Follow these steps to adjust file permissions using an FTP client (e.g., FileZilla):

  1. Connect to Your WordPress Site:
    • Open your FTP client (e.g., FileZilla).
    • Enter your FTP server details (usually provided by your hosting provider).
    • Navigate to your WordPress installation directory.
  2. Set Folder Permissions:
    • Right-click your WordPress folder and select “File permissions.”
    • Set the numeric value to 755 for folders.
    • Ensure the “Recurse into subdirectories” box is checked.
    • Click OK to apply the changes.
  3. Adjust File Permissions:
    • Locate your index.php file within the WordPress folder.
    • Right-click the file and select “File permissions.”
    • Set the numeric value to 644 for files.
    • Click OK.
  4. Repeat for Other Files and Folders:
    • Apply similar permissions to other files and directories as needed.

Changing File Permissions Using cPanel File Manager

If your hosting uses cPanel, you can also modify permissions directly through the cPanel File Manager:

  1. Log in to cPanel:
    • Access your cPanel dashboard via your hosting account.
    • Navigate to the File Manager.
  2. Select Your WordPress Folder:
    • Right-click your WordPress folder and choose “Change Permissions.”
    • Set the permission value to 755.
  3. Modify Individual Files:
    • Double-click your WordPress folder to explore its contents.
    • Locate the index.php file.
    • Right-click it and select “Change Permissions.”
    • Set the permission value to 644.

Best Practices for File Permissions in WordPress

  • Folders: Set to 755 (read, write, execute for owner; read and execute for group and others).
  • Files: Set to 644 (read and write for owner; read-only for group and others).

Remember to test your site thoroughly after making changes to ensure everything functions as expected. Regularly review and update permissions to maintain security. If you encounter any issues, seek assistance from your hosting provider or WordPress community.

By following these guidelines, you’ll enhance your WordPress site’s security and protect it from potential threats. 🛡️🔒


Customize Permissions

You can easily customize the file permissions that Hide My WP Ghost sets by adding a simple definition to your wp-config.php file.

Use the following code snippet:

define( 'HMW_FILE_PERMISSION', 0640); 

This code modifies the default file permissions from 0644 to 0640. You can adjust the value 0640 to any permission level that suits your needs. Just place this code in your wp-config.php file, and it will automatically apply your custom settings.

To change the directory permissions:

define( 'HMW_DIR_PERMISSION', 0750);

This code modifies the default dir permissions from 0755 to 0750. You can adjust the value 0750 to any permission level that suits your needs. Just place this code in your wp-config.php file, and it will automatically apply your custom settings.

How To Setup Hide My WP on Local Flywheel

What is Flywheel?

Local by Flywheel is a user-friendly local WordPress development tool that simplifies site creation and management on your local machine. It provides features like automatic WordPress installation, advanced development tools, and seamless site synchronization with cloud services.

Local By Flywheel is a Nginx/Apache based solution and it will require some extra setup after you install Hide My WP Ghost plugin on Nginx version.

flywheel local server

Setup Hide My WP Ghost

Please follow this tutorial step by step to set up the Hide My WP Ghost for Local after you installed the plugin:

  1. First, go to Hide My WP > Advanced > Compatibility and select the server type as “Local by Flywheel” to identify the config path and setup.
Hide My WP and Local by Flywheel
  1. In your WordPress dashboard, go to Hide My WP > Change Paths
  2. Select the Safe Mode or Ghost Mode, scroll down and customize the paths as you like.
  1. Click the Save button to save the changes.

After the save process, you should receive a message with instructions to include the line in conf/nginx/site.conf.hbs file from the site folder.

  1. Copy the line include includes/hidemywp.conf .
  2. Open the site folder and edit the file conf/nginx/site.conf.hbs .

  1. Add the line before the WordPress Rules like in the image below.
  1. Restart the server from your panel
  1. After the flywheel server loads, click the “Frontend Test” and see if the frontend is loading correctly. You can also check the website with a different browser or from incognito mode.

  1. If everything loads fine in Frontend, click the button “Yes, it’s working” button. Otherwise click on “No, abort” to roll back to previous settings.

Preventing 404 Errors After Deactivating Hide My WP Ghost Plugin

404 errors can be a frustrating experience for both website owners and visitors alike. These errors occur when a requested page is not found on the server, often leaving users stranded and confused. While this plugin is designed to have custom paths indexed in Google for good SEO, deactivating it can leave behind custom paths that need proper handling to prevent 404 errors.

Fortunately, there are steps that can be taken to prevent 404 errors after deactivating the Hide My WP Ghost plugin, especially if custom paths were utilized in Safe Mode or Ghost Mode. Below, we’ll outline solutions for both Apache and Nginx servers to handle this issue effectively.


Apache Server Solution

If your website is hosted on an Apache server, you can prevent 404 errors by adding specific rules to your .htaccess file. Follow these steps:

  1. Access Your .htaccess File: Locate and access the .htaccess file in the root directory of your WordPress installation. If you can’t find it, ensure that your FTP client or file manager is configured to display hidden files.
  2. Add Rewrite Rules: Insert the following rewrite rules at the beginning of your .htaccess file:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^([_0-9a-zA-Z-]+/)?core/views/(.*) /wp-content/themes/$2 [QSA,L]
RewriteRule ^([_0-9a-zA-Z-]+/)?storage/(.*) /wp-content/uploads/$2 [QSA,L]
RewriteRule ^([_0-9a-zA-Z-]+/)?core/(.*) /wp-content/$2 [QSA,L]
RewriteRule ^([_0-9a-zA-Z-]+/)?lib/(.*) /wp-includes/$2 [QSA,L]
</IfModule>
  1. Save and Test: Save the changes to your .htaccess file and test your website to ensure that the 404 errors have been resolved.

Nginx Server Solution

For websites hosted on Nginx servers, the solution involves adding specific rules to the nginx.conf file. Follow these steps:

  1. Access Your nginx.conf File: Locate and access the nginx.conf file on your server. This file is often found in the /etc/nginx/ directory.
  2. Add Rewrite Rules: Insert the following rewrite rules within your Nginx configuration:
if (!-e $request_filename) {
    rewrite ^/([_0-9a-zA-Z-]+/)?core/views/(.*) /wp-content/themes/$2 last;
    rewrite ^/([_0-9a-zA-Z-]+/)?storage/(.*) /wp-content/uploads/$2 last;
    rewrite ^/([_0-9a-zA-Z-]+/)?core/(.*) /wp-content/$2 last;
    rewrite ^/([_0-9a-zA-Z-]+/)?lib/(.*) /wp-includes/$2 last;
}
  1. Save and Reload Nginx: After adding the rewrite rules, save the nginx.conf file and reload Nginx to apply the changes. You can do this by running sudo systemctl reload nginx in your terminal.

Remember, if you’ve used different custom paths, be careful to modify the rewrite rules accordingly to match your specific setup.

By implementing these solutions, you can effectively prevent 404 errors on your WordPress website after deactivating custom paths set by the Hide My WP Ghost plugin.

These rules ensure that custom paths are properly handled, avoiding the frustration of broken links and improving the overall user experience. Always remember to backup your files before making any changes to your website’s configuration.

Config .htaccess in OpenLiteSpeed: A Step-by-Step Guide

Source: linuxconfig.org

OpenLiteSpeed’s compatibility with Apache makes it an attractive choice for web administrators looking to migrate seamlessly. One of the essential features it inherits from Apache is the support for .htaccess files, allowing users to configure settings on a per-directory basis.

In this tutorial, we will explore how to enable .htaccess support in OpenLiteSpeed on a Linux system, ensuring a smooth transition for those accustomed to Apache’s configuration structure.

Step-by-Step Guide:

Step 1: Accessing OpenLiteSpeed Web Admin Panel: Start by navigating to the OpenLiteSpeed web admin panel at https://localhost:7080/login.php and log in with your administrator credentials.plaintextCopy code$ https://localhost:7080/login.php

Step 2: Enabling .htaccess Support: If you wish to enable .htaccess support for the entire web server, go to Server Configuration > General > Rewrite Control. Change the ‘Auto Load from .htaccess’ option to ‘Yes.’

Step 3: Virtual Host Configuration: If you prefer enabling .htaccess support for a specific virtual host, navigate to Virtual Hosts > Select your virtual host > Rewrite. Change both the ‘Enable Rewrite’ and ‘Auto Load from .htaccess’ options to ‘Yes.’

Step 4: Performing a Graceful Restart: After making these changes, perform a graceful restart for the configuration to take effect. This step is crucial for the web server or virtual host (depending on your configuration choice) to recognize the rewrite rules within the .htaccess files in each directory.plaintextCopy code# /path/to/openlitespeed/bin/lswsctrl restart

Conclusion:

In this tutorial, we have learned how to seamlessly integrate .htaccess support into OpenLiteSpeed on a Linux system.

Whether configuring it server-wide or for a specific virtual host, the process ensures that the web server recognizes and implements the specified rewrite rules within the .htaccess files.

This flexibility allows web administrators to retain the convenience of per-directory configuration while enjoying the benefits of OpenLiteSpeed’s performance and compatibility.

How to Use Hide My WP Ghost with Nginx Hosting Without Editing Config Files

The transition of web hosting services from Apache to Nginx can sometimes lead to compatibility issues with WordPress plugins. This is particularly challenging when the hosting provider doesn’t permit direct editing of server configuration files, as is the case with Nginx sharing hosting.

In this tutorial, we will guide you through the process of using the Hide My WP Ghost plugin with Nginx hosting, ensuring your site remains secure and functional without the need to modify the nginx.conf file.

Fortunately, Hide My WP Ghost is designed to operate seamlessly on different server types, including Nginx, without requiring changes to the server configuration files. Here’s how you can maintain your website’s security with Hide My WP Ghost on an Nginx server:


Use Built-in Features Hide My WP Ghost offers several built-in functionalities that don’t require server file alterations

custom login with hmwp
  • Custom Login, Lost Password, and Signup paths can be set directly within the plugin.
  • Brute Force protection for login and author pages helps prevent unauthorized access attempts.
  • The Firewall feature monitors and blocks suspicious traffic.
  • The Hide Version function conceals your WordPress version number from public view.
  • Two-Factor Authentication (2FA) adds an additional security layer at login.


Use a preset security settings that only activates non-rewrite rules features

  • Go to Hide My WP > Backup / Restore > Preset Security
  • Select the Minimal (No Config Rewrites) security preset
  • Load the preset and follow the instructions is required

The login path will be set as /newlogin by default but it can be changed after loading the preset.


Alternative to security preset loading option

restore no-rewrite config from backup
  • Download no_custom_core_backup.txt file, which is a backup created by Hide My WP Ghost.
  • Restore your settings from Hide My WP > Backup/Restore.
  • After restoring, the default custom login path will be set to /newlogin. If needed, you can change this path according to your preference.

Testing the Plugin After you’ve restored the settings from the backup:

test custom login path with hmwp
  • Test the login functionality to ensure the custom path is working.
  • Verify that other features like Brute Force protection and 2FA are operational.
  • Check the Firewall’s activity log to confirm that it’s actively monitoring your site.

By following this guide, you can successfully use Hide My WP Ghost with any kind of hosting.

For any further assistance or queries, do not hesitate to contact the plugin support team.

Keep your WordPress site secure and running smoothly, regardless of the hosting infrastructure changes.

How to Disable Hide My WP Ghost on Specific Pages

First, install and activated the Hide My WP Ghost plugin. Then, follow these solutions:


Using Settings:

  1. Access Hide My WP Ghost Settings:
    • From the left-hand sidebar, go to Hide My WP > Change Paths > Whitelist Options.
  2. Add the URLs of the Specific Pages:
    • Enter the slug or relative URL of the pages where you want to disable Hide My WP Ghost.
      (e.g., if you wish to exclude “sample-page”, you would add “/sample-page/”).
    • Click ‘Save Settings’ once done.

That’s the general method to exclude specific pages from being affected by Hide My WP Ghost. However, if you want more flexibility and control, you can use the add_filter function in your theme’s functions.php file or a custom plugin.


Using add_filter to Disable Hide My WP Ghost:

  1. Access Your Theme’s functions.php File:
    • From your WordPress Dashboard, navigate to Appearance > Theme Editor.
    • Find and click on the functions.php file in the right-hand column.
  2. Add the Custom Filter:
    • At the end of the file, paste the following code:

function disable_hmwp_on_specific_pages($process) {
    // Check if we're viewing a specific page by its slug
    if (is_page('your-page-slug')) {
        return false;
    }

    return $process;
}

add_filter('hmwp_process_init', 'disable_hmwp_on_specific_pages');
  1. Modify the Code:
    • Replace 'your-page-slug' with the slug of the page where you want to disable Hide My WP Ghost.
    • If you have multiple pages, you can add additional conditions.
  2. Save Changes:
    • Click ‘Update File’ to save the changes you’ve made to functions.php.

With that, Hide My WP Ghost should be disabled on the specific pages you’ve chosen.

Remember to always back up your website before making any code changes, and test your site afterward to ensure everything works as expected.

How to Add a Custom Config File for Nginx Servers

Hide My WP Ghost allows you to change the default configuration file/path when the website root path is not writable.

Prerequisites:

  • Access to your server’s Nginx configuration.

Step 1: Create a Custom Configuration File

  1. Connect to your server using SSH or your preferred method.
  2. Navigate to your WordPress root directory, typically located at /path_to_root/wp-content/.
  3. Create a new file named hidemywp_custom.conf inside the wp-content directory using the following command:
   touch /path_to_root/wp-content/hidemywp_custom.conf

Step 2: Modify Nginx Configuration

  1. Open your Nginx server configuration file using a text editor. The location of this file may vary depending on your system setup. Commonly, it’s located at /etc/nginx/nginx.conf or in a directory like /etc/nginx/sites-available/.
  2. Inside the server block of your Nginx configuration, add the following line:
   server {
       # Other existing configurations...

       include /path_to_root/wp-content/hidemywp_custom.conf;

       # Other existing configurations...
   }

path_to_root

Change path_to_root with the actual path to website root (WordPress instalation folder).

Step 3: Edit wp-config.php

  1. Access your WordPress installation folder on the server.
  2. Locate the wp-config.php file and open it in a text editor.
  3. Add the following code snippet at the end of the file, or after WP_DEBUG definition:
   add_filter('hmwp_config_file', function(){
       return ABSPATH . 'wp-content/hidemywp_custom.conf';
   });

Step 4: Save Hide My WP Ghost Settings

  1. Log in to your WordPress dashboard.
  2. Navigate to Hide My WP > Custom Paths
  3. Click the “Save Changes” button to save the new custom config path.

Step 5: Restart Nginx

  1. To apply the changes and load the new config path into memory, restart Nginx using the following command:
   sudo service nginx restart

Congratulations! You have successfully added a custom config path in Hide My WP Ghost for Nginx servers. This custom path enhances the security of your WordPress website by moving the configuration file to a different location, making it harder for potential attackers to locate it.

Please note that whenever you make changes to the custom config path, you must restart Nginx to ensure the modifications take effect.

How To Setup Plesk To Work As Apache

To set up Plesk to work like Apache and configure the Hide My WP Ghost plugin, follow these steps:

  1. Log in to Plesk as an administrator.
  2. Go to “Websites & Domains” and click on “Apache & nginx Settings” for the desired domain.
  3. Scroll down to the “nginx settings” section.
  4. Select the “Proxy mode” checkbox. This enables nginx to act as a reverse proxy for Apache.
  5. Clear the “Smart static files processing” checkbox. This ensures that all static files are passed through to Apache for processing.
  6. Clear the “Serve static files directly by nginx” checkbox. This instructs nginx to pass all static file requests to Apache for handling.
  7. Click “Apply” to save the changes.

With these settings, Apache will handle all content, both static and dynamic, while nginx acts as a reverse proxy. This configuration allows you to set up the Hide My WP Ghost plugin specifically for Apache.

Please note that using Apache as the sole handler for all content may have performance implications.

plesk apache handle

More details: https://docs.plesk.com/en-US/onyx/customer-guide/websites-and-domains/hosting-settings/web-server-settings/apache-and-nginx-settings.72320/#serve-all-static-and-dynamic-content-via-apache


Configure the Hide My WP Ghost plugin specifically for Apache

After setting up Plesk to work like Apache, follow these steps to configure the Hide My WP Ghost plugin specifically for Apache:

  1. Log in to your WordPress dashboard.
  2. Navigate to “Hide My WP” in the sidebar and click on it.
  3. From the sub-menu, choose “Advanced.”
  4. In the “Compatibility” tab, locate the “Server type” section.
  5. Select “Apache server” from the available options. This ensures that the plugin’s settings are compatible with Apache.
  6. Click “Save” to save the changes.
hidemywp apache server type

By specifying the server type as Apache within the Hide My WP Ghost plugin, you ensure that the plugin’s functionality aligns with the configuration you’ve set up in Plesk. This ensures proper compatibility and optimal performance when hiding your WordPress site’s information from prying eyes.

Redirect Images From The Old Paths to The New Paths

If you change the image paths using Hide My WP Ghost plugin, it is important not to have the same image on two different URLs on a website to avoid duplicate content issues and to maintain good search engine optimization (SEO) practices.

When search engines like Google detect duplicate content, it can negatively impact the website’s visibility and rankings in search results.

  1. Set a new uploads path. Choose a directory name in Hide My WP > Change Paths > WP Core Security like “storage” where you want to store the uploaded images.
  1. Add the below code in the config file.

For Apache/Litespeed, locate the .htaccess file in the root directory of your website and add the following code at the beginning of the file:

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{THE_REQUEST} /wp-content/uploads/[^\.]+(\.jpg|\.png|\.jpeg|\.webp|\.gif) [NC]
RewriteRule ^([_0-9a-zA-Z-]+/)?wp-content/uploads/(.*)$ /storage/$2  [L,R=301]
</IfModule>

For Nginx servers add this code before the Hide My WP Ghost include line in the Nginx config file:

  if ($request_uri ~* ^/wp-content/uploads/[^\.]+(\.jpg|\.png|\.jpeg|\.webp|\.gif)){
    rewrite ^/wp-content/uploads/(.*)$ /storage/$1 redirect;
  }

This code utilizes mod_rewrite, a module that allows URL rewriting. It checks if the request is for an image file within the /wp-content/uploads/ directory and redirects it to the corresponding file in the /storage/ directory.

By implementing this solution, any requests for images in the old /wp-content/uploads/ the directory will be redirected to the new /storage/ directory, preventing duplicate URLs for the same image.

Learn how to hide the old image paths from users:

https://hidemywpghost.com/faqs/how-can-i-hide-the-old-images-paths/

Cloud Panel Server – Hide My WP Ghost Setup

If you’re looking to protect your website from malicious attacks, Hide My WP Ghost is an excellent plugin that can help you secure your website. Hide My WP Ghost can be installed on a Cloud Panel server, and this article will guide you through the process.

Before you begin, make sure that you have a Cloud Panel server with Nginx installed and a WordPress websited.


Here are the steps to set up Hide My WP Ghost on a Cloud Panel server:

Step 1: Install Hide My WP Ghost on the Cloud Panel website.

The first step is to install Hide My WP Ghost on the Cloud Panel website. You can do this by downloading the plugin from the WordPress directory or the Hide My WP Ghost website and installing it like any other WordPress plugin.

Step 2: Select Cloud Panel server type

After you’ve installed Hide My WP Ghost, go to Hide My WP > Advanced > Compatibility and select the server type as Cloud Panel. This will ensure that the plugin is compatible with the Cloud Panel server.

Step 3: Setup new paths in Hide My WP Ghost

Once you’ve selected the server type as Cloud Panel, you’ll need to set up the custom paths in Hide My WP Ghost.

After you’ve set up the custom paths, save the settings and follow the notification to include the hidemywpghost.conf file in the Cloud Panel Vhost file on the Cloud Panel dashboard.

To do this, add the include file above the {{settings}} line in the Vhost file. Save the Vhost file and restart Nginx from the Cloud Panel admin section.

Step 4: Check the frontend and login page

Once you’ve restarted Nginx, check the frontend page and login page with Hide My WP Ghost. You can confirm that the plugin is working by clicking on “Yes, it’s working“.

Note! The custom wp-admin will be redirected to the default wp-admin once the used is logged to the server. This is because Cloud Panel can’t rewrite the wp-admin through Nginx config file.

Congratulations! You’ve successfully set up Hide My WP Ghost on a Cloud Panel server. With this plugin, you can protect your website from malicious attacks and ensure that your website is secure.

Use Hide My WP Ghost with Hummingbird Cache Plugin

If you’re looking to optimize your WordPress website’s performance, Hummingbird is a great plugin to help you achieve that. And the best part is that it’s compatible with Hide My WP Ghost, allowing you to keep your website secure while improving its speed.

To take full advantage of Hummingbird, you need to activate the caching feature, which will store your website’s files on the server for faster delivery to your visitors. Once caching is enabled, you can use the Identify Cached Files option to find out which files are cached and where they’re located.

However, if you’re using Hide My WP Ghost, you need to make sure that the paths to these cached files are changed to prevent detection by potential attackers. To do this, you can use the plugin’s Change Paths in Cache Files option, which will automatically update the paths to your cached files.

But that’s not all. Hummingbird also comes with an Assets Optimization feature that can minify and combine your website’s CSS and JS files for faster load times. To take advantage of this feature, you need to activate the Minification option in the Basic Options section.

Once the Minification option is activated, Hummingbird will automatically combine and minify your website’s CSS and JS files, reducing their size and improving your website’s performance. And as with the caching feature, you can use Hide My WP Ghost’s Change Paths in Cache Files option to change the paths to these optimized files and keep your website secure.

Another important thing to keep in mind is that Hummingbird allows you to change the location of your cache files. By default, Hummingbird stores your cache files in the /wp-content/cache/hummingbird/ directory. However, you can change this location to a custom directory like /wp-content/cache/optimization in the Assets Optimization > Settings section.

By changing the location of your cache files, you can further improve your website’s security by making it harder for potential attackers to find your cached files.

By combining it with Hide My WP Ghost, you can keep your website secure while improving its speed. Just remember to activate the Minification option in Hummingbird’s Basic Options section, use the Identify Cached Files option to find your cached files, and change their paths using Hide My WP Ghost.

Use Hide My WP Ghost with Breeze Cache Plugin

If you are looking for a cache plugin that works perfectly with Hide My WP Ghost, then Breeze is definitely the plugin for you. Breeze is a free, powerful and user-friendly WordPress cache plugin that helps improve the speed of your website. When you combine Breeze with Hide My WP Ghost, you can easily optimize your website speed and also secure it from hackers.

One of the features that make Breeze such a great match for Hide My WP Ghost is the plugin’s minification option, which is located in the Basic Options section. When you activate the minification option, Breeze will automatically minify and combine your CSS and JS files. This helps to reduce the number of HTTP requests and also the file size, which ultimately results in a faster loading website.

When using Hide My WP Ghost, it’s important to hide your plugins and themes from all Theme Detectors. With Breeze and Hide My WP Ghost, you can easily achieve this. By hiding your plugins and themes, you can make it more difficult for hackers to find vulnerabilities in your website. This is important because hackers often target websites that are easy to hack and leave themselves open to vulnerabilities.

In order to use Breeze with Hide My WP Ghost, you’ll need to follow these steps:

  1. Install and activate Breeze and Hide My WP Ghost plugins.
  2. Go to Breeze settings and activate the minification option in the Basic Options section.
  3. Once you have activated minification, go to the Advanced Options section and select the “Don’t cache these pages” option.
  4. Next, add the following pages to the “Don’t cache these pages” option: custom login path, custom admin, and any other pages that require user interaction.
  5. Finally, go to Hide My WP Ghost settings and activate the option “Change Paths in Cache Files”. This will automatically change the paths in background using the cron option.

By following these steps, you can easily optimize your website speed and secure it from hackers. With Breeze and Hide My WP Ghost working together, your website will load faster, and your plugins and themes will be hidden from all Theme Detectors.

In addition to minification, Breeze also offers other optimization features such as Gzip compression, browser caching, and database optimization. When combined with Hide My WP Ghost, you can achieve the perfect balance between website speed and security.

In conclusion, if you are looking for a cache plugin that works perfectly with Hide My WP Ghost, then Breeze is the plugin for you. With Breeze’s minification option and Hide My WP Ghost’s ability to hide plugins and themes from all Theme Detectors, you can easily optimize your website speed and secure it from hackers. By following the steps outlined above, you can achieve a faster-loading, more secure website.

7G Firewall for WordPress

WordPress is the most widely used content management system (CMS) on the web, powering more than 40% of all websites. However, its popularity makes it a prime target for hackers and cybercriminals. As a website owner, it’s your responsibility to secure your site and protect it from malicious attacks. One way to do that is by using a firewall.

Firewalls are security programs that protect your website from unauthorized access and malicious traffic. They can help block suspicious traffic, prevent brute-force attacks, and protect against SQL injections and other types of attacks.

The 7G Firewall is an advanced firewall created by Jeff Starr, a well-known WordPress security expert. It offers lightweight, server-level protection against a wide range of threats, including malicious requests, bad bots, automated attacks, spam, and other types of nonsense. The firewall works by analyzing incoming traffic and blocking any suspicious requests before they reach your website.

One of the benefits of using the 7G Firewall is that it’s highly customizable. You can choose from several levels of protection, including minimal, medium, and maximum. The minimal level is suitable for most websites and provides basic protection against common threats. The medium level offers additional protection against more advanced threats, while the maximum level is recommended for high-traffic websites that are frequent targets of attacks.

However, it’s worth noting that the 7G Firewall may not work with all server configurations. If you’re not sure whether it’s compatible with your server, you can select minimal or medium protection to ensure compatibility.


If you’re using Hide My WP Ghost to secure your WordPress website, you can easily activate the 7G Firewall by following the tutorial provided by the plugin. Once activated, the firewall will run silently in the background, protecting your website from a wide range of threats without impacting its performance.

In conclusion, if you’re looking to secure your WordPress website, a firewall is an essential tool to have in your security arsenal. Hide My WP Ghost’s 7G Firewall protection for Apache-based servers is a powerful and customizable solution that can help keep your site safe from malicious attacks.

By following the plugin’s tutorial, you can easily activate the firewall and enjoy the peace of mind that comes with knowing your website is protected.

Disable Hide My WP Ghost for User Roles

Our plugin is designed to provide users with the highest level of security and customization. One unique feature of our plugin is the ability to whitelist specific IP addresses, which allows users to grant access to certain users while blocking others.

This can be particularly useful for businesses or organizations that want to grant access to employees or trusted partners while blocking access to unauthorized users.

If you want to disable the plugin for logged users with specific roles, you can add this code in the functions.php file of the theme:

add_action('template_redirect','hidePathsByUserRole');

function hidePathsByUserRole(){

    if (function_exists('wp_get_current_user')) {
        $user = wp_get_current_user();
        $allowed_roles = array(
            'administrator',
            'editor', 
            'author'
        );

        if( isset($user->roles) && is_array($user->roles) && array_intersect($allowed_roles, $user->roles ) ) {
            add_filter('hmwp_process_paths', '__return_false');
            add_filter('hmwp_process_buffer', '__return_false');
            add_filter('hmwp_process_hide_disable', '__return_false');
            add_filter('hmwp_process_find_replace', '__return_false');
        }
    }
}

The code will disable Hide My WP Ghost for administrators, editors and authors. You can add new roles or remove roles from the code.

Hide wp-admin and wp-login.php from Source Code

Hiding the wp-admin and wp-login.php paths from source code it’s important especially when you use obscurity through security solution like Hide My WP Ghost.

The fastest way to change it is to use the mapping feature from Hide My WP Ghost. This way you can change the /wp-admin to a random name which will redirect the user to a page or a 404 page.

(more…)

Ploi.io Server – Hide My WP Ghost Setup

Ploi.io service is similar with RunCloud and it helps you install your WordPress websites in minutes without being an expert. We found Ploi being a secure and accessible service.

Installation

To install Hide My WP Ghost plugin on a websites using Ploi.io, follow this tutorial.


1. Create a Server with Ubuntu + Nginx + PHP > 8



2. Create a website and add WordPress CMS

After you add WordPress on your server through Ploi, go to the website and finish the WordPress installation.


3. Install and setup Hide My WP Ghost

Now, follow the Hide My WP install & configuration like in this tutorial:

https://hidemywpghost.com/kb/hide-my-wp-ghost-tutorial/


4. Ploi.io with NGINX Server Type

When you select the Safe Mode or Ghost Mode in Hide My WP Ghost will detect the Nginx and will show you the hidemywp.conf file you need to add in Ploi.io panel in order to load the rewrite rules.

First, create the hidemywp.conf file on the website root directory through File Manager

Now, save the Safe Mode in Hide My WP Ghost and you will get the line you need to include in Ploi.io.

On Ploi.io panel, go to Manage and click on Edit NGINX configuration.

Add the include line that you copied from Hide My WP Ghost notification and add it before the ssl protocol definition.

Save the NGINX configuration and the changes will be applied automatically.

Go back to your website and test the login page. If the login is loading correctly, confirm the changes and you’re done.

Troubleshooting

I get an error when changing the admin path on Ploi server.

To avoid any cache error when changing the admin path, make sure OPCache on Ploi server is turned off until the plugin configuration is finished.

WPMUDEV Server – Hide My WP Ghost Setup

Attention all users!

We’ve received valuable feedback from many of you about challenges faced while configuring Nginx with WPMUDEV support. Based on this feedback, we want to ensure a smooth experience for everyone using our tutorial. Therefore, we recommend considering an alternative hosting solution for Nginx or utilizing the plugin solely for customizing/hiding the login path, rather than applying it to all WordPress common paths.

Here’s how to set up the Hide My WP Ghost plugin on WPMUDEV server:

  1. Configure Hide My WP Ghost for your site the way you want it and make sure to save your settings using the Save button;
  1. Go to the website root directory using File Manager and download the hidemywp.conf file;
  1. Open a support ticket with WPMUDEV’s support team and send them the hidemywp.conf file in order to add the new paths to your website (your host will add the hidemywp.conf file in the Nginx and restart the server);

    (your host will be able to add the config line in the Nginx and restart the Nginx server);
  1. Back up the settings in HMWP Ghost from Hide My WP > Backup / Restore and deactivate the plugin until the rules are added by WPMUDEV support.

  1. Once you get the reply that the rules have been added, activate HMWP Ghost plugin and restore the settings in HMWP Ghost.

  1. Verify the login and confirm if the website loads correctly with the new paths.

You can learn more about how to use the Back Up and Restore feature here >>

Kinsta Server – Hide My WP Ghost setup

Here’s how to set up the Hide My WP Ghost plugin on Kinsta server:

  1. Configure Hide My WP Ghost for your site the way you want it and make sure to save your settings using the Save button;
This image has an empty alt attribute; its file name is image-1024x496.png
  1. Go to the website root directory using File Manager and download the hidemywp.conf file;
  1. Contact Kinsta’s support team and send them the hidemywp.conf file in order to add the new paths to your website (your host will add the hidemywp.conf file in the Nginx and restart the server);

  1. Back up the settings in HMWP Ghost from Hide My WP > Backup / Restore and deactivate the plugin until the rules are added in Nginx and the Nginx server is restarted.

  1. Once the rules are added, activate HMWP Ghost plugin and restore the settings to load the new paths.

  1. Verify the login and confirm if the website loads correctly with the new paths.

You can learn more about how to use the Back Up and Restore feature here >>

RELATED: Is Hide My WP Ghost compatible with Kinsta hosting?

Hide My WP Ghost

Ideal Hide My WP Ghost Settings – Best Practice 2024

Learn how to set up Hide My WP Ghost in Ghost Mode and activate all security features you need for a stronger and safer website in just 6 minutes.

VIDEO OUTLINE

  1. Min. 1.00 – 1.33: Select and Save GHOST MODE
  2. Min. 1.33 – 2.24: Change Paths Settings
  3. Min. 2.25 – 3.43: Tweaks Settings
  4. Min. 3.43 – 4.07: Brute Force Settings
  5. Min. 4.08 – 4.36: Events Log Settings
  6. Min. 4.36 – 5.29: Security Check
  7. Min. 5.29 – 6.28: View Changes

👉 Min. 01.00 – 1.33: Select and Save GHOST MODE


Recommended Actions:

  • Select Ghost Mode
  • A pop-up will appear showing you all the predefined paths that Hide My WP Ghost sets in Ghost Mode. READ the info.
  • Click on Continue, and then SAVE.
  • Run the Frontend Login test. 
  • SAVE your login URL (!very important that you do this)
  • SAVE your SAFE URL (!also very important, you’ll need this in case you can’t login)
  • If the test is successful, click on Yes, it’s working.

👉 Min. 1.33 – 2.24: Change Paths Settings


Admin Security

  • Custom Admin Path – Recommended action: Leave as is
  • Hide wp-admin – Recommended: ON 
  • Hide wp-admin From Non-Admin users – Recommended: ON
  • Hide the New Admin Path – Recommended: ON


Login Security

  • Custom Login Path – Recommended action: Leave as is
  • Hide wp-login.php – Recommended: ON 
  • Hide login Path – Recommended: ON
  • Custom Lost Password Path – Recommended action: Leave as is
  • Custom Register Path – Recommended action: Leave as is
  • Custom Logout Path – Recommended action: Leave as is


Ajax Security

  • Custom admin-ajax Path – Recommended action: Leave as is
  • Hide wp-admin from Ajax URL – Recommended: ON
  • Change Paths in Ajax Calls – Recommended: ON


User Security

  • Custom Author Path – Recommended action: Leave as is
  • Hide Author ID URL – Recommended: ON


WP Core Security

  • Custom wp-content Path – Recommended action: Leave as is
  • Custom wp-includes Path – Recommended action: Leave as is
  • Custom uploads Path – Recommended action: Leave as is
  • Custom comment Path – Recommended action: Leave as is
  • Hide WordPress Common Paths – Recommended: ON
  • Hide File Extensions – Recommended action: Leave as is


Plugins Security

  • Custom plugins Path – Recommended action: Leave as is
  • Hide Plugin Names – Recommended: ON
  • Hide All the Plugins – Recommended: OFF
  • Hide WordPress Old Plugins Path – Recommended: ON
  • Show Advanced Options– Recommended: OFF


Themes Security

  • Custom themes Path – Recommended action: Leave as is
  • Hide Theme Names – Recommended: ON
  • Hide WordPress Old Themes Path – Recommended: ON
  • Custom theme style name – Recommended action: Leave as is
  • Show Advanced Options – Recommended: OFF


API Security

  • Custom wp-json Path – Recommended action: Leave as is
  • Hide REST API URL link – Recommended: ON
  • Disable REST API access – Recommended: OFF
  • Disable XML-RPC access – Recommended: ON
  • Disable RSD Endpoint from XML- RPC – Recommended: ON


Firewall and Headers

  • Add Security Headers for XSS and Code Injection Attacks – Recommended: ON
  • Strict-Transport-Security – Recommended: ACTIVE, leave as is
  • Content-Security-Policy – Recommended: ACTIVE, leave as is
  • X-XSS- Protection – Recommended: ACTIVE, leave as is
  • X-Content-Type- Options – Recommended: ACTIVE, leave as is
  • Cross-Origin-Embedder- Policy – Recommended action: ADD then leave as is
  • Cross-Origin-Opener-Policy – Recommended action: ADD then leave as is
  • X-Frame-Options – Recommended action: ADD then leave as is
  • Remove Unsafe Headers – Recommended: ON
  • Block Theme Detectors Crawlers – Recommended: ON
  • Firewall Against Script Injection – Recommended: ON

👉 Min. 2.25 – 3.43: Tweaks Settings


Redirects

  • Redirect Hidden Paths – Recommended action: Leave as is (redirects hidden paths to your front page)
  • Do Login & Logout Redirects – Recommended: OFF


Feed and Sitemap

  • Hide Feed and Sitemap Link Tags – Recommended: ON
  • Change Paths in RSS feed – Recommended: ON
  • Change Paths in Sitemaps XML – Recommended: ON
  • Hide Paths in Robots.txt – Recommended: ON


Change Options

  • Change Paths for Logged Users – Recommended: ON
  • Change Relative URLs to Absolute URLs – Recommended: OFF


Hide Options

  • Hide Admin Toolbar – Recommended: ON
  • Select User Roles – Recommended action: Select the users roles for whom you DON’T want the Admin Toolbar to be visible.
  • Hide Version from Images, CSS and JS in WordPress – Recommended: ON
  • Hide IDs from META Tags – Recommended: ON
  • Hide WordPress DNS Prefetch META Tags – Recommended: ON
  • Hide WordPress Generator META Tags – Recommended: ON
  • Hide HTML Comments – Recommended: ON
  • Hide Emojicons – Recommended: ON
  • Hide Embed Scripts – Recommended: ON
  • Disable WLW Manifest scripts – Recommended: ON


Disable Options

  • Disable Right-Click – Recommended: ON
  • Disable Click Message – Recommended action: Leave as is, customization is not mandatory
  • Disable Inspect Element – Recommended: ON
  • Disable Inspect Element Message – Recommended action: Leave as is, customization is not mandatory
  • Disable View Source – Recommended: ON
  • Disable View Source Message – Recommended action: Leave as is, customization is not mandatory
  • Disable Copy/Paste – Recommended: ON
  • Disable Copy/Paste Message – Recommended action: Leave as is, customization is not mandatory
  • Disable Drag/Drop Images – Recommended: OFF
  • Disable DB Debug in Frontend – Recommended: ON

👉 Min. 3.43 – 4.07: Brute Force Settings

  • Blocked IPs report – Recommended action: Activate Brute Force Protection
  • Bruce Force Settings >> Use Brute Force Protection – Recommended: ON

!! In most cases, the Math reCAPTCHA is enough to protect your website against Brute Force login attacks.

  • Max fail attempts – Recommended action: Leave as is or customize based on preferences
  • Ban Duration – Recommended action: Leave as is or customize based on preferences
  • Lockout Message – Recommended action: Leave as is, customization is not mandatory

👉 Min. 4.08 – 4.36: Events Log Settings

  • Events Log Report – Recommended action: Activate Log Users Events
  • Events Log Settings >> Log Users Events – Recommended: ON
  • Log User Roles – Recommended: Leave as is (Hide My WP will log all user roles), or select specific user roles whose activity you want Hide My WP Ghost to log.

👉 Min. 4.36 5.29: Security Check

Recommended Actions:

  • Click on Start Scan to run a new WordPress security check. 
  • Check the list of Action Items that Hide My WP Ghost generated.
  • See if there are still issues that need to be resolved.
  • Follow the instructions to try and fix as many of them as possible.

By setting up Ghost Mode for your site, you’ve strengthened your site’s security, as shown by the graphic.


👉 Min. 5.29 – 6.28: View Changes

Recommended Actions: 

  • Click on Visit Site to see the changes you’ve enabled using Hide My Ghost take effect.
  • Log out from your account if you want to test things like: Right Click, View Source, and you’ll see that this functionality has been disabled for your site (based on your settings)
  • Take a look at your site’s source code to see the modified paths.

 

IMPORTANT! The settings shown in this video will work best for most sites – and present a way to quickly, safely, and effectively set up Ghost Mode for your site.

However, the ideal settings can look different from case to case, and you can always further customize these settings based on your needs and wants. 

We advise you to always read the documentation that we link to from within the plugin and ensure you clearly understand what each setting enables you to do.

NOTE!

👋 How to Fix 403 Forbidden Error in WordPress caused by ModSecurity (mod_security)

ModSecurity is an open-source firewall application (or WAF) supported by different web servers (such as Apache, Nginx, IIS) and used by a lot of hosts.

The issue: If they have rule #212340 in place – which they most likely do by default – then it will prevent the Code Editor from working in Ghost Mode from Hide My WP Ghost.

The solution: If you encounter this issue, make sure to contact your host to turn off Rule 212340 or whitelist you from it.

Once you do that, you should no longer see the 403 Forbidden Error.

Hide My WP Ghost Compatibility Themes List

Hide My WP Ghost is compatible with the most popular themes. We are continuously working on this to further extend the list of themes that Hide My WP Ghost is compatible with.

We’ve tested Hide My WP Ghost with over 1,000 plugins and themes so far, and we’ll keep at it. But if you DON’T see a theme you may be using on our list here just yet, it doesn’t mean Hide My WP Ghost won’t work with it or cause issues.

Hide My WP Ghost doesn’t physically change any path or file. Rewrites happen when a browser accesses files and paths.

Here are some of the latest themes we checked to make sure they work with Hide My WP Ghost.

Themes

Compatibility issues are unlikely, especially if you use the Safe Mode from Hide My WP Ghost.

Compatibility problems were fixed for:

  • Builders
  • Server hosting
  • Cache Plugins
  • Security Plugins

We fixed for those, because that’s where most issues were found in the past and we keep working on making it more compatible with them.

If you want us to test other WordPress plugins or themes, please contact us and send us the plugin/theme URL.

We are open to testing Hide My WP Ghost with more plugins and themes, as we are continuously looking for new ways to make Hide My WP Ghost as valuable as possible for a wide range of users.

[RELATED] Hide My WP Ghost Compatibility Plugins List

Hide My WP Ghost Exceptions

Hide My WP Ghost is compatible with all servers, hosting services, and also supports WordPress Multisite.

However, there are certain exceptions you need to take note of. We’ve documented these exceptions in this article, so make sure to keep reading.


Hide My WP Ghost with WordPress.com – Business plan

  • Automattic does NOT allow for the wp-admin and the wp-login paths to be customized. WordPress uses Jetpack for login security and doesn’t accept any changes made to wp-admin and wp-login.php.
  • you CAN, however, use Hide My WP Ghost to customize and hide other paths, such as WordPress Common Paths, in order to secure vulnerabilities related to plugins and themes. You can learn more about this here.

Hide My WP Ghost will not Work with Shared & Unmanaged NGINX Servers IF:

  • user is unable to add the hidemywp.conf file to nginx.conf (this is required in order for all rewrites to be loaded). So, in order to use Hide My WP Ghost, user needs to have access to NGINX config file and access to restart the service. Or, user needs to be able contact the host to add the path_to_file/hidemywp.conf file in NGINX and restart the service for them.
  • the host refuses to make changes in the nginx.conf file and restart NGINX.

Setup Hide My WP on RunCloud

If you run the service RunCloud, there are 2 easy options you can select on Application type who will run with Hide My WP Ghost plugin.


RunCloud – NGINX + Apache2 Hybrid

After you select to create the application WordPress on your server through RunCloud select the option NGINX + Apache2 Hybrid at the Web Application Stack. This way all the paths are loaded from .htaccess and there is no need for custom Nginx configuration.

Now, follow the Hide My WP configuration like in this tutorial:

https://hidemywpghost.com/kb/hide-my-wp-ghost-tutorial/#safeghostmode


RunCloud – Native NGINX

After you select to create the application WordPress on your server through RunCloud select the option Native NGINX at the Web Application Stack.

Hide My WP Ghost will detect the Nginx and will show you the hidemywp.conf file you need to add in RunCloud in order to load the rewrite rules.

First, create the hidemywp.conf file on the website root directory through File Manager

Now, save the Safe Mode in Hide My WP Ghost and you will get the line you need to include in RunCloud.

On RunCloud, go to NGINX Config and add the line from Hide My WP Ghost. Verify and save the settings.

For more configuration in Hide My WP Ghost, follow this tutorial:

https://hidemywpghost.com/kb/hide-my-wp-ghost-tutorial/#safeghostmode

To reload the Nginx config after you change the paths in Hide My Ghost click on Rebuild Web App Config and the plugin changes will take effect.

Hide The Old Image Paths with Hide My WP Ghost

Before hiding the images with old paths, it’s important to understand what this process entails and what are the risks involved.

Given the fact that images DON’T represent a security risk for your site, hiding them is NOT a necessity, or something we recommend doing to increase protection of your WordPress site.

From an SEO standpoint, if the images have already been indexed by Google, this is what will happen when someone lands on your site via Google Images: they will see a 404 Page Not Found error.

Even if you don’t use Hide My WP Ghost to hide images, over time, Google will index all images with the new paths without affecting SEO.

However, if you still wish to hide the images with the old paths, follow the steps below:


Hide Old Images

Add the following line to your wp-config.php:

define( 'HMW_HIDE_OLD_IMAGES', true );

Once you’ve added this, go to Hide My WP > Change Paths > WP Core Security, and you will see the option to hide Images files in the drop-down under the Hide WordPress Common Paths section (as shown in the screenshot below).

Select the IMAGE files option and Save your settings.

Once you do this, you can go ahead and check using another browser (or by going Incognito) to see if the old images can still be accessed.


Possible errors that might appear as a result of hiding old images

If your theme or other plugins load images into CSS or JS, then it’s possible for images not to load in frontend. A solution for this is using a cache plugin and activating the option to modify the paths in cache files using Hide My WP Ghost.