cPFence provides an easy way to generate a comprehensive list of all WordPress sites on your server, along with their respective account owners. This list can be exported in CSV format and is useful for various administrative and security purposes.
Generating the WordPress Sites List
To generate the list, use the following command:
cpfence --generate-wp-sites-list
Once the command completes, the list will be saved as a text file in the following location:
/var/log/cpfenceav/wp-sites-list.txt
Each line in the file contains the path to a WordPress site and the associated account owner in the following format:
/path/to/wordpress,account_owner
Example Output
Here’s an example of the output file:
/var/www/site1/public_html,account1
/var/www/site2/public_html,account2
/var/www/site3/public_html,account3
Exporting to CSV Format
To convert the file into a CSV format for further analysis, you can rename or move the file with a `.csv` extension. For example:
mv /var/log/cpfenceav/wp-sites-list.txt /var/log/cpfenceav/wp-sites-list.csv
You can then open the file using tools like Microsoft Excel, Google Sheets, or LibreOffice for sorting, filtering, and analysis.
Use Cases
The generated WordPress sites list can be useful in several scenarios:
- Security Audits: Identify and monitor all WordPress sites to ensure they are secure and up to date.
- Resource Management: Analyze which account owners are hosting WordPress sites and assess server usage.
- Targeted Maintenance: Plan updates, backups, or migrations for specific sites based on account ownership.
- Quarantine or Cleanup: Cross-check infected sites with the list to take necessary actions.
Notes
- Ensure the file is regularly updated if your server setup changes or new sites are added.
- Handle the generated list securely to protect account owner information.
Need Further Assistance?
If you encounter any issues or need additional help, feel free to reach out to our support team via your client portal.