Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
litespeed_wiki:cpanel:installation-one-click-installer [2019/08/14 20:45]
Michael Alegre removed
— (current)
Line 1: Line 1:
-====== Install and Activate LSCWP with Installation ====== 
-If you use the Installation 1-click installer, then you have the option to install the LiteSpeed Cache plugin using their hook system. 
  
-From WHM, navigate to **Plugins > Installation > Applications > Customization** and add the following code: 
- 
-  <?​php ​ 
-  class i_installer_customcode ​ 
-  {  
-      function init($o) ​ 
-      {  
-          $o->​registerArchive("​litespeed-cache",​ "​https://​downloads.wordpress.org/​plugin/​litespeed-cache.zip",​ "​zip"​);​ 
-          $o->​registerCustomCode("​wordpress",​ "​all",​ "​install",​ "​input",​ "​wordpressinstallinput"​);​ 
-          $o->​registerCustomCode("​wordpress",​ "​all",​ "​install",​ "​last",​ "​wordpressinstall"​);​ 
-      }  
-  ​ 
-      function wordpressinstallinput($o) ​ 
-      {  
-          $o->​setInputFields(array( ​ 
-              array( ​ 
-                  "​ID"​ => "​litespeed-cache", ​ 
-                  "​LABEL"​ => "​LiteSpeed Cache", ​ 
-                  "​TEXT"​ => "​Install the LiteSpeed Cache plugin?", ​ 
-                  "​TYPE"​ => "​radio",​ 
-                  "​VALUE"​ => "​yes",​ 
-                  "​OPTIONS"​ => array( "​yes"​ => "​Yes",​ "​no"​ => "​No"​) 
-               ​), ​ 
-          ));  
-      }  
-  ​ 
-      function wordpressinstall($o) ​ 
-      {  
-          if ( isset($o->​input["​field_litespeed-cache"​]) && $o->​input["​field_litespeed-cache"​] == "​yes"​ )  
-          {  
-              $o->​installPlugin("​litespeed-cache/​litespeed-cache.php",​ "​litespeed-cache"​);​ 
-          } 
-      }  
-  } 
-  ?> 
- 
-The above code will register the latest LiteSpeed Cache plugin version as an archive in Installation,​ then it will make a selection box to choose whether the LiteSpeed Cache plugin should be installed or not (defaults to ''​yes''​). 
- 
-If **LiteSpeed Cache** is set to ''​yes'',​ then it will install the plugin and activate it. 
  • Admin
  • Last modified: 2019/08/14 20:45
  • by Michael Alegre