Let's download the Cos-html-cache 2.7.3 page static plugin
1. The Install plugin page searches the Cos-html-cache plug-in, and installs
1. Create HTML folder under root directory, permission 777
2. Create index.bak files under root directory, permissions 666
3. Modify the fixed connection format as a custom structure,/html/%post_id%_%postname%.html
4. Activate the plugin
5. Modify the site default first order, add a line in. htaccess:
DirectoryIndex index.html index.htm index.php index.cgi
6. Modify the Subject search box code, in the searchform.php file, will
The code is as follows |
Copy Code |
action= "<?php Echo esc_url (Home_url (/));?>" To be replaced by: action= "<?php Echo esc_url (Home_url (/index.php));?>" |
Inspection:
Exit login, re-access page, generate HTML file in HTML directory, and include string <!–cos-html-cache-in page source code
Safe-tag–> is installed successfully.
Problems that cannot be generated by static files
Because some server-defined document_root is inconsistent with the directory path of the virtual space, COS-HTML-CAHCE cannot find the correct directory to generate
HTML, such as the 000webhost server.
There is one row in the cos-html-cache.php file:
$path = $_server[' Document_root ']. " /";
The solution can use a PHP script to test your host's space path, and then change the value of the $path to the space root directory path.
You can create a PHP file that writes the following code.
The code is as follows |
Copy Code |
<?php echo "Severpath:". DirName (__file__); echo "<br/>"; $path = $_server[' Document_<div Style= "Display:none" ><a title= "how to increase vertical jump" href= "http://howverticaljump.com/" >how To increase vertical jump</a> ROOT ']. " /"; echo "Document_root:" $path;?> |
Then upload to the space root directory, Access script files, compare, view document_root and space path, if inconsistent, modify $path
Value can be.
For example visit: http://111cn.net/root_test.php, return Result:
The code is as follows |
Copy Code |
Severpath:/home/a4675762/public_html Document_root:/usr/local/apache/htdocs/ |
You can see that two paths are completely different, then modify $path to:
The code is as follows |
Copy Code |
$path = "/home/a4675762/public_html/"; |
OK, log out of the blog (be sure to log out to generate HTML static page), and then visit the page again, HTML should be able to generate normal.