Updating PST Modules
Please use the latest version of WEXAL® Page Speed Technology (hereinafter referred to as "PST"). The latest version continuously applies bug fixes, security updates, and implements changes in evolving web technology. Root privileges are necessary to update.
$ sudo yum update kusanagi-prem3
or
$ su -
[root@kusanagi8 ~]# yum update kusanagi-prem3
If the following message is displayed, PST (3.x) is not installed. Refer to "When migrating from a previous PST (2.x)" for more information.
No packages marked for update
or
Package(s) kusanagi-prem3 available, but not installed.
No packages marked for update
Configuring Initial Profile Settings
To activate PST, select one KUSANAGI profile in which to configure the intial settings. The initial settings are executed with the "pst init" command. The profile is specified at the end of the "pst" command. Or, the command can be executed from the profile directory (as the current directory.)
To execute the "pst" command,"kusanagi" user or root privileges are required. If you want to enable PST for multiple profiles, please configure initial settings for each profile.
[kusanagi@kusanagi8 ~]$ pst init %PROFILE-NAME%
or
[kusanagi@kusanagi8 ~]$ cd /home/kusanagi/%PROFILE-NAME%
[kusanagi@kusanagi8 %PROFILE-NAME%]$ pst init
Once the initial PST settings are complete, the PST Manager URL will be displayed.
pst watch stopped.
pst watch started.
Info: open WEXAL manager form http://xxx.xxx.xxx.xxx:61000
The following steps can also be performed through PST Manager. If you use PST Manager to set up, refer to "For first-time users - Setup in PST Manager" for more information.
Enabling PST
Enable PST for a profile that has completed the initial setup. PST is enabled with the "pst on" command. The profile is specified at the end of the "pst" command. Or, the command can be executed from the profile directory (as the current directory.) To execute the "pst" command,"kusanagi" user or root privileges are required.
[kusanagi@kusanagi8 ~]$ pst on %PROFILE-NAME%
or
[kusanagi@kusanagi8 ~]$ cd /home/kusanagi/%PROFILE-NAME%
[kusanagi@kusanagi8 %PROFILE-NAME%]$ pst on
Checking PST Status
First, check if PST is enabled. Run "pst status" command to display PST status. The profile is specified at the end of the "pst" command. Or, the command can be executed from the profile directory (as the current directory.) To execute the "pst" command,"kusanagi" user or root privileges are required.
[kusanagi@kusanagi8 ~]$ pst status %PROFILE-NAME%
WEXAL Page Speed Technology = on
Watch = on
or
[kusanagi@kusanagi8 ~]$ cd /home/kusanagi/%PROFILE-NAME%
[kusanagi@kusanagi8 %PROFILE-NAME%]$ pst status
WEXAL Page Speed Technology = on
Watch = on
Modifying PST Configurations
You can change PST settings by editing the configuration file. The format is YAML. The configuration file is "wexal/pst.config.yaml" in the profile directory. Refer to the "PST Configuration File" for more information.
Optimizing Resources
PST Resource Monitoring Service (watch) monitors changes to resources in profiles and generates optimized resource files for images, scripts, and style sheets in response to updates. However, for resources that existed in a profile before executing the initial PST configuration, an optimized resource file will not be generated until the resource is updated. Therefore, it is necessary to generate an optimized resource file for the resources in the profile.
Run the "pst opt all" command to perform resource optimization. The profile is specified at the end of the "pst" command. Or, the command can be executed from the profile directory (as the current directory.) To execute the "pst" command,"kusanagi" user or root privileges are required.
Resource optimization will take time if the number of resource files is large. By limiting the number of target directories to be optimized, optimization time can be shortened. The optimization time can also be shortened by using the "pst opt image", "pst opt js", and "pst opt css" commands instead of the "pst opt all" command to limit the resources to be optimized. Refer to "PST Commands" for more information.
[kusanagi@kusanagi8 ~]$ pst opt all %PROFILE-NAME%
or
[kusanagi@kusanagi8 ~]$ cd /home/kusanagi/%PROFILE-NAME%
[kusanagi@kusanagi8 %PROFILE-NAME%]$ pst opt all
You can check the progress of resource optimization with the "pst queue" command. To execute the "pst" command,"kusanagi" user or root privileges are required.
[kusanagi@kusanagi8 ~]$ pst queue
If the value of the Resource Optimization Service "optimizer" queue is 0, resource optimization is complete. Also, you can check if there are optimized resource files under the "wexal/optdir" directory in the profile. Below is an example of checking optimized resources for images uploaded in August 2021.
[kusanagi@kusanagi8 ~]$ ls -l /home/kusanagi/%PROFILE-NAME%/wexal/optdir/wp-content/uploads/2021/08
-rw-r--r--. 1 root root 106707 August 3 09:50 img1-1024x640.jpg
-rw-r--r--. 1 root root 44520 August 3 09:50 img1-1024x640.jpg.webp
-rw-r--r--. 1 root root 137492 August 3 09:50 img1-1200x750.jpg
-rw-r--r--. 1 root root 57288 August 3 09:50 img1-1200x750.jpg.webp
-rw-r--r--. 1 root root 7489 August 3 09:50 img1-150x150.jpg
-rw-r--r--. 1 root root 3782 August 3 09:50 img1-150x150.jpg.webp
-rw-r--r--. 1 root root 204712 August 3 09:50 img1-1536x960.jpg
-rw-r--r--. 1 root root 82396 August 3 09:50 img1-1536x960.jpg.webp
-rw-r--r--. 1 root root 14863 August 3 09:50 img1-300x188.jpg
-rw-r--r--. 1 root root 6956 August 3 09:50 img1-300x188.jpg.webp
-rw-r--r--. 1 root root 66012 August 3 09:50 img1-768x480.jpg
-rw-r--r--. 1 root root 27914 August 3 09:50 img1-768x480.jpg.webp
-rw-r--r--. 1 root root 252283 August 3 09:50 img1.jpg
-rw-r--r--. 1 root root 103324 August 3 09:50 img1.jpg.webp