{"id":4789,"date":"2019-09-20T14:01:41","date_gmt":"2019-09-20T14:01:41","guid":{"rendered":"http:\/\/myprojects.advchaweb.com\/?p=4789"},"modified":"2019-09-20T16:04:39","modified_gmt":"2019-09-20T16:04:39","slug":"wordpress-and-woocommerce","status":"publish","type":"post","link":"https:\/\/myprojects.advchaweb.com\/index.php\/2019\/09\/20\/wordpress-and-woocommerce\/","title":{"rendered":"WordPress and Woocommerce"},"content":{"rendered":"<p>WordPress and Woocommerce<\/p>\n<p>Download the latest from wordpress.org. I got version 5.2.3<\/p>\n<p>SETUP LOCAL WITH NGINX<\/p>\n<pre class=\"lang:default decode:true\">sudo gedit \/etc\/nginx\/sites-available\/wp523_commerce.test<\/pre>\n<p>content:<\/p>\n<pre class=\"lang:default decode:true\">server {\r\n    listen 80; \r\n    listen [::]:80;\r\n    root \/home\/teddy\/Documents\/works\/wp523_commerce; #your document root\r\n    server_name www.wp523_commerce.test wp523_commerce.test ;  # Your server name\r\n    index index.php index.html index.htm ;\r\n\r\n    # Webfonts,fonts\r\n    location ~* \\.(?:ttf|ttc|otf|eot|woff|woff2)$ {\r\n        add_header \"Access-Control-Allow-Origin\" \"*\";\r\n        expires 1y;\r\n        access_log off;\r\n        add_header Cache-Control \"public\";\r\n    }\r\n\r\n    # Media: images, icons, video, audio, HTC\r\n    location ~* \\.(?:jpg|jpeg|gif|png|ico|cur|gz|svg|svgz|mp4|ogg|ogv|webm|htc)$ {\r\n        expires 1y;\r\n        access_log off;\r\n        add_header Cache-Control \"public\";\r\n    }\r\n\r\n    # Js, Css\r\n    location ~* \\.(?:css|js)$ {\r\n        expires 1y;\r\n        access_log off;\r\n        add_header Cache-Control \"public\";\r\n    }\r\n\r\n    # Serve static files without touching php\r\n    location \/ {\r\n        try_files $uri $uri\/ \/index.php?$args;\r\n    } \r\n    # pass requests for dynamic content to site\r\n    location ~ [^\/]\\.php(\/|$) {\r\n        try_files $uri \/index.php; \r\n        fastcgi_pass unix:\/run\/php\/php7.3-fpm.sock;\r\n        \r\n        fastcgi_buffers 1024 4k;\r\n\r\n        fastcgi_read_timeout 600s;\r\n        fastcgi_connect_timeout 600s;\r\n\r\n        fastcgi_index index.php;\r\n        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;\r\n        #include fastcgi_params;\r\n        #FOR DEVELOPMENT MODE ONLY - BEGIN\r\n        fastcgi_param MAGE_IS_DEVELOPER_MODE true;\r\n        fastcgi_param PHP_VALUE  display_startup_errors=on;\r\n        fastcgi_param PHP_VALUE  display_errors=on;\r\n        fastcgi_param PHP_VALUE  html_errors=on;\r\n        fastcgi_param PHP_VALUE  log_errors=on;\r\n        fastcgi_param PHP_VALUE  error_log=\/home\/teddy\/Documents\/works\/wp523_commerce\/var\/log\/system.log;\r\n        #FOR DEVELOPMENT MODE ONLY - END\r\n        include fastcgi_params;\r\n    }\r\n\r\n    gzip on;\r\n    gzip_disable \"msie6\";\r\n\r\n    gzip_comp_level 6;\r\n    gzip_min_length 1100;\r\n    gzip_buffers 16 8k;\r\n    gzip_proxied any;\r\n    gzip_types\r\n    text\/plain\r\n    text\/css\r\n    text\/js\r\n    text\/xml\r\n    text\/javascript\r\n    application\/javascript\r\n    application\/x-javascript\r\n    application\/json\r\n    application\/xml\r\n    application\/xml+rss\r\n    image\/svg+xml;\r\n    gzip_vary on;\r\n\r\n    # Banned locations (only reached if the earlier PHP entry point regexes don't match)\r\n    location ~* (\\.php$|\\.htaccess$|\\.git) {\r\n        deny all;\r\n    }\r\n}<\/pre>\n<ul>\n<li>Enable file config\n<pre class=\"lang:default decode:true\">sudo ln -s \/etc\/nginx\/sites-available\/wp523_commerce.test \/etc\/nginx\/sites-enabled\/wp523_commerce.test<\/pre>\n<\/li>\n<li>Register the host on my system\n<pre class=\"lang:default decode:true\">sudo gedit \/etc\/hosts<\/pre>\n<p>Like this:<\/p>\n<pre class=\"lang:default decode:true\">...\r\n127.0.0.1 \twp523_commerce.test\r\n...<\/pre>\n<\/li>\n<li>CHECK THE NGINX SETTING AND RESTART IT:\n<pre class=\"lang:default decode:true\">teddy@teddy:~$ sudo nginx -t\r\nnginx: the configuration file \/etc\/nginx\/nginx.conf syntax is ok\r\nnginx: configuration file \/etc\/nginx\/nginx.conf test is successful<\/pre>\n<pre class=\"lang:default decode:true\">sudo service nginx restart<\/pre>\n<\/li>\n<\/ul>\n<p>CREATE A NEW DATABASE: wp523_commerce COLLATION utf8_general_ci<br \/>\nOpen it on your browser and install : http:\/\/wp523_commerce.test<br \/>\nsetting:<br \/>\nusername: admin<br \/>\npassword: xA**EbXJ4UNw96u0wI<\/p>\n<p>Download theme &#8216;futurio&#8217; from https:\/\/futuriowp.com\/free-woocommerce-theme\/<br \/>\nthen extract and put it in theme dir. install<br \/>\nThen download plugin futurio extra from https:\/\/wordpress.org\/plugins\/futurio-extra\/<br \/>\nThen download plugin wordpress-importer from https:\/\/wordpress.org\/plugins\/wordpress-importer\/<br \/>\nThen download plugin elementor from https:\/\/wordpress.org\/plugins\/elementor\/<br \/>\nThen download plugin WooCommerce<br \/>\nfrom https:\/\/wordpress.org\/plugins\/woocommerce\/<br \/>\nThen download plugin Ajax Search for WooCommerce<br \/>\nfrom https:\/\/wordpress.org\/plugins\/ajax-search-for-woocommerce\/<br \/>\nextract and put these plugins into plugins dir then install<\/p>\n<p>Then download the sample data from https:\/\/futuriowp.com\/docs\/futurio\/importing-the-sample-data\/. Follow the instructions to import the sample data. NOTE: I can&#8217;t import the data from the local site. I have to import it manually!<\/p>\n<p>TEST: http:\/\/wp523_commerce.test<br \/>\nADMIN: http:\/\/wp523_commerce.test\/wp-admin<br \/>\nWOOCOMMERCE SHOP: http:\/\/wp523_commerce.test\/shop<\/p>\n","protected":false},"excerpt":{"rendered":"<p>WordPress and Woocommerce Download the latest from wordpress.org. I got version 5.2.3 SETUP LOCAL WITH NGINX sudo gedit \/etc\/nginx\/sites-available\/wp523_commerce.test content: server { listen 80; listen [::]:80; root \/home\/teddy\/Documents\/works\/wp523_commerce; #your document root server_name www.wp523_commerce.test wp523_commerce.test ; # Your server name index index.php index.html index.htm ; # Webfonts,fonts location ~* \\.(?:ttf|ttc|otf|eot|woff|woff2)$ { add_header &#8220;Access-Control-Allow-Origin&#8221; &#8220;*&#8221;; expires 1y; &hellip; <a href=\"https:\/\/myprojects.advchaweb.com\/index.php\/2019\/09\/20\/wordpress-and-woocommerce\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;WordPress and Woocommerce&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[44],"tags":[],"class_list":["post-4789","post","type-post","status-publish","format-standard","hentry","category-wordpress-tutorial"],"_links":{"self":[{"href":"https:\/\/myprojects.advchaweb.com\/index.php\/wp-json\/wp\/v2\/posts\/4789","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/myprojects.advchaweb.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/myprojects.advchaweb.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/myprojects.advchaweb.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/myprojects.advchaweb.com\/index.php\/wp-json\/wp\/v2\/comments?post=4789"}],"version-history":[{"count":8,"href":"https:\/\/myprojects.advchaweb.com\/index.php\/wp-json\/wp\/v2\/posts\/4789\/revisions"}],"predecessor-version":[{"id":4797,"href":"https:\/\/myprojects.advchaweb.com\/index.php\/wp-json\/wp\/v2\/posts\/4789\/revisions\/4797"}],"wp:attachment":[{"href":"https:\/\/myprojects.advchaweb.com\/index.php\/wp-json\/wp\/v2\/media?parent=4789"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/myprojects.advchaweb.com\/index.php\/wp-json\/wp\/v2\/categories?post=4789"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/myprojects.advchaweb.com\/index.php\/wp-json\/wp\/v2\/tags?post=4789"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}