{"id":588,"date":"2008-10-27T00:00:14","date_gmt":"2008-10-27T07:00:14","guid":{"rendered":"http:\/\/ryanorser.com\/?p=588"},"modified":"2008-10-27T00:00:14","modified_gmt":"2008-10-27T07:00:14","slug":"how-to-get-wp-supercache-working","status":"publish","type":"post","link":"https:\/\/ryanorser.com\/index.php\/2008\/10\/27\/how-to-get-wp-supercache-working\/","title":{"rendered":"How to get WP-SuperCache Working"},"content":{"rendered":"<p>This is a step by step how-to to get wp-supercache enabled.<\/p>\n<p>This is my source: <a href=\"http:\/\/www.lavluda.com\/2007\/07\/15\/how-to-enable-mod_rewrite-in-apache22-debian\/\">http:\/\/www.lavluda.com\/2007\/07\/15\/how-to-enable-mod_rewrite-in-apache22-debian\/<\/a><\/p>\n<ol>\n<li>First you need to get apache1.3 of higher installed. I have apache2. Type this command in Ubuntu:<br \/>\nsudo apt-get install apache2<\/li>\n<li>Now that you have apache2 put this command in the terminal: <code><br \/>\nupdatedb<br \/>\nlocate mod_rewrite.so<\/code><\/li>\n<li>This will update the database and find the Rewrite Module for apache.<\/li>\n<li>Now that you have located mod_rewrite.so, you have to go and do a couple of things with some files.<\/li>\n<li>Go to this folder with the command that follows:<br \/>\n<code>cd \/etc\/apache2\/mods-enabled<\/code><\/li>\n<li>The next step is to use this command:<br \/>\n<code>touch rewrite.load<\/code><\/li>\n<li>Using this last command will put this piece of code into rewrite.load:<br \/>\n<code>LoadModule rewrite_module \/usr\/lib\/apache2\/modules\/mod_rewrite.so<br \/>\n<\/code><\/li>\n<li>Now edit \/etc\/apache2\/sites-available\/default you can do this with either of these commands:<br \/>\nsudo nano \/etc\/apache2\/sites-available\/default or<br \/>\nsudo gedit \/etc\/apache2\/sites-available\/default<\/li>\n<li>Now that you have the file open, change:<br \/>\nOptions Indexes FollowSymLinks MultiViews<br \/>\nAllowOverride None<br \/>\nOrder allow,deny<br \/>\nallow from all<\/li>\n<li>Change that to:<br \/>\nOptions Indexes FollowSymLinks MultiViews<br \/>\nAllowOverride all<br \/>\nOrder allow,deny<br \/>\nallow from all<\/li>\n<li>Now that you are finished with enabling mod_rewrite, we have to work with your .htaccess file.<\/li>\n<li>go to your sites root directory:<br \/>\ncd \/home\/yoursiteroot\/<\/li>\n<li>Edit your .htaccess with either of these commands:<br \/>\nsudo nano .htaccess<br \/>\nsudo gedit .htaccess<\/li>\n<li>copy and paste this into the .htaccess file:<br \/>\n# BEGIN WPSuperCache<br \/>\n&lt;IfModule mod_rewrite.c&gt;<br \/>\nRewriteEngine On<br \/>\nRewriteBase \/<br \/>\nAddDefaultCharset UTF-8<br \/>\nRewriteCond %{REQUEST_METHOD} !=POST<br \/>\nRewriteCond %{QUERY_STRING} !.*=.*<br \/>\nRewriteCond %{HTTP:Cookie} !^.*(comment_author_|wordpress|wp-postpass_).*$<br \/>\nRewriteCond %{HTTP:Accept-Encoding} gzip<br \/>\nRewriteCond %{DOCUMENT_ROOT}\/wp-content\/cache\/supercache\/%{HTTP_HOST}\/$1\/index.$<br \/>\nRewriteRule ^(.*) \/wp-content\/cache\/supercache\/%{HTTP_HOST}\/$1\/index.html.gz [L]<\/p>\n<p>RewriteCond %{REQUEST_METHOD} !=POST<br \/>\nRewriteCond %{QUERY_STRING} !.*=.*<br \/>\nRewriteCond %{HTTP:Cookie} !^.*(comment_author_|wordpress|wp-postpass_).*$<br \/>\nRewriteCond %{DOCUMENT_ROOT}\/wp-content\/cache\/supercache\/%{HTTP_HOST}\/$1\/index.$<br \/>\nRewriteRule ^(.*) \/wp-content\/cache\/supercache\/%{HTTP_HOST}\/$1\/index.html [L]<br \/>\n&lt;\/IfModule&gt;<br \/>\n# END WPSuperCache<\/p>\n<p># BEGIN WordPress<br \/>\nRewriteCond %{REQUEST_FILENAME} !-f<br \/>\nRewriteCond %{REQUEST_FILENAME} !-d<br \/>\nRewriteRule . \/index.php [L]<br \/>\n# END WordPress<\/li>\n<li>save your work.<\/li>\n<li>And for the final thing to do is this command:<br \/>\nsudo \/etc\/init.d\/apache2 restart<\/li>\n<\/ol>\n<p>Thanks for reading,<br \/>\nRyan Orser<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This is a step by step how-to to get wp-supercache enabled. This is my source: http:\/\/www.lavluda.com\/2007\/07\/15\/how-to-enable-mod_rewrite-in-apache22-debian\/ First you need to get apache1.3 of higher installed. I have apache2. Type this command in Ubuntu: sudo apt-get install apache2 Now that you have apache2 put this command in the terminal: updatedb locate mod_rewrite.so This will update the [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/ryanorser.com\/index.php\/wp-json\/wp\/v2\/posts\/588"}],"collection":[{"href":"https:\/\/ryanorser.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ryanorser.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ryanorser.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ryanorser.com\/index.php\/wp-json\/wp\/v2\/comments?post=588"}],"version-history":[{"count":0,"href":"https:\/\/ryanorser.com\/index.php\/wp-json\/wp\/v2\/posts\/588\/revisions"}],"wp:attachment":[{"href":"https:\/\/ryanorser.com\/index.php\/wp-json\/wp\/v2\/media?parent=588"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ryanorser.com\/index.php\/wp-json\/wp\/v2\/categories?post=588"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ryanorser.com\/index.php\/wp-json\/wp\/v2\/tags?post=588"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}