{"id":2804,"date":"2014-04-11T09:08:31","date_gmt":"2014-04-11T09:08:31","guid":{"rendered":"http:\/\/blog.shineservers.com\/?p=2804"},"modified":"2014-04-11T09:08:31","modified_gmt":"2014-04-11T09:08:31","slug":"cpanel-optimize-website-longer-working","status":"publish","type":"post","link":"https:\/\/www.shineservers.com\/2014\/04\/11\/cpanel-optimize-website-longer-working\/","title":{"rendered":"cPanel Optimize Website No longer working"},"content":{"rendered":"<p>When client tries to enable or disable &#8220;Optimize Website&#8221; in cPanel, this error is shown:<\/p>\n<blockquote><p>OptimizeWS::optimizews(,) failed: Modification of non-creatable array value attempted, subscript -1 at \/usr\/local\/cpanel\/Cpanel\/OptimizeWS.pm line 104, &lt;HC&gt; line 52.<\/p><\/blockquote>\n<p><strong>Here is a Solution:<\/strong><\/p>\n<p>To be certain you are not over-writing any existing data:<\/p>\n<p># mv \/home\/[cPanel user]\/.htaccess \/home\/[cPanel user]\/.htaccess.bak<br \/>\n# echo &gt; \/home\/[cPanel user]\/.htaccess; chown [cPanel user].[cPanel user] \/home\/[cPanel user]\/.htaccess<\/p>\n<p>cPanel &gt;&gt; Software\/Services &gt;&gt; Optimize Website should work as expected once there is an existing .htaccess file with some content in \/home\/[cPanel user]\/.htaccess<\/p>\n<p>Let me know if anything else is needed, i&#8217;ll make sure it get fixed for you.<\/p>\n<p>Thanks<\/p>\n<h3 class=\"zemanta-related-title\" style=\"margin: 0 0 10px 0; padding: 0; clear: both;\">Related articles across the web<\/h3>\n<ul class=\"zemanta-article-ul zemanta-article-ul-image\" style=\"margin: 0; padding: 0; overflow: hidden;\">\n<li class=\"zemanta-article-ul-li-image zemanta-article-ul-li\" style=\"padding: 0; background: none; list-style: none; display: block; float: left; vertical-align: top; text-align: left; width: 104px; font-size: 12px; margin: 0 5px 10px 0;\"><a style=\"padding: 2px; display: block; text-decoration: none;\" href=\"http:\/\/blog.shineservers.com\/optimise-mysql-apache-cpanelwhm\/\" target=\"_blank\" rel=\"noopener noreferrer\"><img decoding=\"async\" style=\"border-radius: 3px; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2); padding: 0; margin: 0; border: 0; display: block; width: 100px; max-width: 100%;\" alt=\"\" src=\"http:\/\/i.zemanta.com\/261167979_150_150.jpg\" \/><\/a><a style=\"display: block; overflow: hidden; text-decoration: none; line-height: 12pt; height: 80px; padding: 5px 2px 0 2px;\" href=\"http:\/\/blog.shineservers.com\/optimise-mysql-apache-cpanelwhm\/\" target=\"_blank\" rel=\"noopener noreferrer\">How To Optimise MySQL &amp; Apache On cPanel\/WHM<\/a><\/li>\n<li class=\"zemanta-article-ul-li-image zemanta-article-ul-li\" style=\"padding: 0; background: none; list-style: none; display: block; float: left; vertical-align: top; text-align: left; width: 104px; font-size: 12px; margin: 0 5px 10px 0;\"><a style=\"padding: 2px; display: block; text-decoration: none;\" href=\"http:\/\/blog.shineservers.com\/install-vnc-server-on-ubuntu-server\/\" target=\"_blank\" rel=\"noopener noreferrer\"><img decoding=\"async\" style=\"border-radius: 3px; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2); padding: 0; margin: 0; border: 0; display: block; width: 100px; max-width: 100%;\" alt=\"\" src=\"http:\/\/i.zemanta.com\/248872534_150_150.jpg\" \/><\/a><a style=\"display: block; overflow: hidden; text-decoration: none; line-height: 12pt; height: 80px; padding: 5px 2px 0 2px;\" href=\"http:\/\/blog.shineservers.com\/install-vnc-server-on-ubuntu-server\/\" target=\"_blank\" rel=\"noopener noreferrer\">How to install VNC server on Ubuntu Server 12.04<\/a><\/li>\n<li class=\"zemanta-article-ul-li-image zemanta-article-ul-li\" style=\"padding: 0; background: none; list-style: none; display: block; float: left; vertical-align: top; text-align: left; width: 104px; font-size: 12px; margin: 0 5px 10px 0;\"><a style=\"padding: 2px; display: block; text-decoration: none;\" href=\"http:\/\/blog.shineservers.com\/optimise-cpanelwhm-server\/\" target=\"_blank\" rel=\"noopener noreferrer\"><img decoding=\"async\" style=\"border-radius: 3px; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2); padding: 0; margin: 0; border: 0; display: block; width: 100px; max-width: 100%;\" alt=\"\" src=\"http:\/\/i.zemanta.com\/238622181_150_150.jpg\" \/><\/a><a style=\"display: block; overflow: hidden; text-decoration: none; line-height: 12pt; height: 80px; padding: 5px 2px 0 2px;\" href=\"http:\/\/blog.shineservers.com\/optimise-cpanelwhm-server\/\" target=\"_blank\" rel=\"noopener noreferrer\">Optimise cPanel\/WHM Server<\/a><\/li>\n<li class=\"zemanta-article-ul-li-image zemanta-article-ul-li\" style=\"padding: 0; background: none; list-style: none; display: block; float: left; vertical-align: top; text-align: left; width: 104px; font-size: 12px; margin: 0 5px 10px 0;\"><a style=\"padding: 2px; display: block; text-decoration: none;\" href=\"http:\/\/blog.shineservers.com\/use-nginx-reverse-proxy-server\/\" target=\"_blank\" rel=\"noopener noreferrer\"><img decoding=\"async\" style=\"border-radius: 3px; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2); padding: 0; margin: 0; border: 0; display: block; width: 100px; max-width: 100%;\" alt=\"\" src=\"http:\/\/i.zemanta.com\/262894551_150_150.jpg\" \/><\/a><a style=\"display: block; overflow: hidden; text-decoration: none; line-height: 12pt; height: 80px; padding: 5px 2px 0 2px;\" href=\"http:\/\/blog.shineservers.com\/use-nginx-reverse-proxy-server\/\" target=\"_blank\" rel=\"noopener noreferrer\">How To Use Nginx As Reverse Proxy Server<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>When client tries to enable or disable &#8220;Optimize Website&#8221; in cPanel, this error is shown: OptimizeWS::optimizews(,) failed: Modification of non-creatable array value attempted, subscript -1 at \/usr\/local\/cpanel\/Cpanel\/OptimizeWS.pm line 104, &lt;HC&gt; line 52. Here is a Solution: To be certain you are not over-writing any existing data: # mv \/home\/[cPanel user]\/.htaccess \/home\/[cPanel user]\/.htaccess.bak # echo &gt; [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[58],"tags":[199],"class_list":["post-2804","post","type-post","status-publish","format-standard","hentry","category-cpanel-control-panel","tag-cpanel-optimize-website-not-working"],"acf":[],"aioseo_notices":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.shineservers.com\/wp-json\/wp\/v2\/posts\/2804","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.shineservers.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.shineservers.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.shineservers.com\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.shineservers.com\/wp-json\/wp\/v2\/comments?post=2804"}],"version-history":[{"count":0,"href":"https:\/\/www.shineservers.com\/wp-json\/wp\/v2\/posts\/2804\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.shineservers.com\/wp-json\/wp\/v2\/media?parent=2804"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.shineservers.com\/wp-json\/wp\/v2\/categories?post=2804"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.shineservers.com\/wp-json\/wp\/v2\/tags?post=2804"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}