Websites
Manage websites.
List all websites​
List all websites hosted on the server:
opencli websites-all
Example output
# opencli websites-all
example.com
example.com/blog
shop.example.net
List only websites of a specific type:
opencli websites-all <TYPE>
Example output
# opencli websites-all wordpress
example.com
example.com/blog
List websites for user​
List all websites owned by user:
opencli websites-user <USERNAME>
Example output
# opencli websites-user stefan
Domain: example.com
PHP version: php8.3
Sites:
Site Name: example.com
Type: wordpress
Version: 6.6.2
Ports:
Path: /var/www/html/example.com
Domain: example.net
PHP version: php8.1
Additional flags:
--type=<TYPE>- list only websites of this type. Runopencli websites-userwithout a username to see available types.--domains=<domain1,domain2,...>- list only websites on these domains.--json- display output as JSON.
Example output
# opencli websites-user stefan --json
{ "example.com": {"php": "php8.3", "sites": [{"site_name": "example.com", "type": "wordpress", "version": "6.6.2", "ports": "", "path": "/var/www/html/example.com"}]},"example.net": {"php": "php8.1"} }
Add websites for user​
Scan user files and add WordPress installations:
opencli websites-scan <USERNAME>
Example output
# opencli websites-scan stefan
- Parsing file: /var/www/html/example.com/wp-config.php
Adding website example.com to Site Manager
Fixing permissions and ownership for the directory /var/www/html/example.com
Scan completed. Detected 1 new WordPress installations:
- example.com, domain: example.com, email: [email protected], version: 6.6.2
use -all flag to run for all users:
opencli websites-scan -all
Example output
# opencli websites-scan -all
Processing user: stefan (1/2)
- Parsing file: /var/www/html/example.com/wp-config.php
Site example.com already exists in the SiteManager - Skipping
Scan completed. No new WordPress installations detected, but the following 1 existing installations are present:
- example.com - domain: example.com, config: /var/www/html/example.com
------------------------------
Processing user: demo (2/2)
Scan completed. No WordPress installations detected.
------------------------------
DONE.
Secure​
Server-level restrictions to harden WordPress instance. Rules are applied at the webserver level before PHP processing.
List all available rules:
opencli websites-secure --list-available-rules
Example output
# opencli websites-secure --list-available-rules
wp_manager_wp_config
wp_manager_xmlrpc
wp_manager_uploads_php
wp_manager_wp_includes_php
wp_manager_admin_script_concat
wp_manager_author_scan
wp_manager_sensitive_files
wp_manager_cache_php
wp_manager_env_files
wp_manager_bad_bots
wp_manager_disable_wp_admin
wp_manager_mitigate_spam_logins
Check if rules exist for a domain:
opencli websites-secure <domain>
Example output
# opencli websites-secure example.com
Status for example.com: rules enabled
wp_manager_xmlrpc
wp_manager_uploads_php
List enabled rules for domain:
opencli websites-secure <domain> --list-active-rules
Example output
# opencli websites-secure example.com --list-active-rules
Active rules for example.com:
wp_manager_xmlrpc
wp_manager_uploads_php
Enable rules for a domain:
opencli websites-secure <domain> --rules='rule1 rule2'
Example output
# opencli websites-secure example.com --rules='wp_manager_xmlrpc wp_manager_uploads_php'
Rules updated for example.com
Disable all rules for a domain:
opencli websites-secure <domain> --disable-all
Example output
# opencli websites-secure example.com --disable-all
All rules removed for example.com
Vulnerability​
Check WordPress website for WP core, theme and plugin vulnerabilities:
opencli websites-vulnerability <WEBSITE>
Example:
opencli websites-vulnerability pejcic.rs
Example output
# opencli websites-vulnerability pejcic.rs
[*] pejcic.rs
Core:
└── WordPress 6.6.2
PLUGINS:
├── akismet 5.3.3 (1/2)
└── contact-form-7 5.9.8 (2/2)
THEMES:
└── twentytwentyfour 1.2 (1/1)
[-] No vulnerabilities found.
Check vulnerabilities for all WordPress websites hosted on server:
opencli websites-vulnerability --all
Example output
# opencli websites-vulnerability --all
[*] pejcic.rs [1 of 2]
Core:
└── WordPress 6.6.2
...
[-] No vulnerabilities found.
[*] example.com/blog [2 of 2]
Core:
└── WordPress 6.5.5
...
[+] Vulnerabilities detected and saved.
Summary: 2 Sites, 5 Plugins, 3 Themes in 00:00:14
[+] stefan notified by email about 2 new finding(s).
With --all, which runs every two days from cron, each website owner gets one email listing the new findings on their WordPress websites, if they have Vulnerable WordPress site turned on in Notifications. A finding is new when the website's previous scan didn't have it, so the same vulnerability isn't emailed again. Scanning a single website doesn't send emails.
PageSpeed​
Get Google PageSpeed data for a single website:
opencli websites-pagespeed <WEBSITE>
Example:
opencli websites-pagespeed pejcic.rs/blog
Example output
# opencli websites-pagespeed pejcic.rs/blog
Google PageSpeed data saved to /etc/openpanel/openpanel/websites/pejcic.rs_blog.json
Get Google PageSpeed data for all websites hosted on server:
opencli websites-pagespeed -all
Example output
# opencli websites-pagespeed -all
Google PageSpeed data saved to /etc/openpanel/openpanel/websites/pejcic.rs.json
Google PageSpeed data saved to /etc/openpanel/openpanel/websites/pejcic.rs_blog.json
Note:
Since version 1.2.2, users can provide their own PageSpeed API key by creating a file namedpagespeed_api_key.txtin their home directory at/var/www/html/.Administrators can also set a system-wide API key by creating the file
/etc/openpanel/openpanel/service/pagespeed.apiand placing the key inside.