You want to hide additional common WordPress files, specifically wp-cron.php, using the WP Ghost plugin. This is accomplished by adding the filter hmwp_hide_commonfiles_files to modify the list of files to be hidden.
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.
functions.phpfunctions.php fileadd_filter('hmwp_hide_commonfiles_files', function($files){
$files[] = 'wp-cron.php';
return $files;
}); wp-config.phpwp-config.php file for editing.wp-config.php file// Add a new file in the list of hidden files
// The file will appear in the Hide WordPress Common Files list
add_filter('hmwp_hide_commonfiles_files', function($files){
$files[] = 'myfile.php';
return $files;
}); If you want to hide additional files such as wp-trackback.php and xmlrpc.php, you can modify the code as follows:
// Add new files in the list of hidden files
// The files will appear in the Hide WordPress Common Files list
add_filter('hmwp_hide_commonfiles_files', function($files){
$files[] = 'myfile.php';
$files[] = 'myfile1.php';
$files[] = 'myfile2.php';
return $files;
}); After adding the filter, you must select the file and save the settings in the WP Ghost to apply the changes.
Note! For Nginx server, you need to restart the Nginx service after saving the settings in WP Ghost plugin.
xmlrpc.php can prevent remote publishing and applications that use XML-RPC from functioning correctly.By following this tutorial, you can easily extend the functionality of the 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.
Because hackers often use bots to search for security flaws in your website, it is…
The easiest way to change the default media uploads path is to use the WP…
To hide all CSS and JS you need to follow the steps to Combine the…
https://youtu.be/6ylhojSi-_E In this video, we’ll explore why website security matters and what can happen if…
The security of your WordPress site depends on multiple factors, such as the strength of…
When you enable two-factor authentication (2FA) for your WordPress website, it adds an extra layer…