{"id":902,"date":"2018-11-09T10:18:04","date_gmt":"2018-11-09T10:18:04","guid":{"rendered":"https:\/\/sites.alldaycity.com\/mirageglobe\/?p=902"},"modified":"2018-11-16T15:26:23","modified_gmt":"2018-11-16T15:26:23","slug":"wordpress-multisite-on-debian","status":"publish","type":"post","link":"https:\/\/pages.alldaycity.com\/mirageglobe\/wordpress-multisite-on-debian\/","title":{"rendered":"WordPress multisite on Debian"},"content":{"rendered":"\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"2000\" height=\"1333\" src=\"https:\/\/pages.alldaycity.com\/mirageglobe\/wp-content\/uploads\/sites\/2\/2018\/11\/blogging-blur-business-261662.jpg\" alt=\"\" class=\"wp-image-910\" srcset=\"https:\/\/pages.alldaycity.com\/mirageglobe\/wp-content\/uploads\/sites\/2\/2018\/11\/blogging-blur-business-261662.jpg 2000w, https:\/\/pages.alldaycity.com\/mirageglobe\/wp-content\/uploads\/sites\/2\/2018\/11\/blogging-blur-business-261662-300x200.jpg 300w, https:\/\/pages.alldaycity.com\/mirageglobe\/wp-content\/uploads\/sites\/2\/2018\/11\/blogging-blur-business-261662-768x512.jpg 768w, https:\/\/pages.alldaycity.com\/mirageglobe\/wp-content\/uploads\/sites\/2\/2018\/11\/blogging-blur-business-261662-1024x682.jpg 1024w\" sizes=\"auto, (max-width: 2000px) 100vw, 2000px\" \/><figcaption>editing by pexels<\/figcaption><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">setting up a new debian webserver with wordpress on vultr<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">to setup a new machine, I recommend always plan your system with a list of comments (which you can do either starting with &#8220;#&#8221; or &#8220;\/\/&#8221;). For example setting up a simple standalone virtual machine with the following requirements:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>debian<\/li><li>increasing the memory size (optional)<\/li><li>nginx<\/li><li>php 7<\/li><li>mariadb (mysql)<\/li><li>wordpress multisite<\/li><\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">If you are finding a provider, you can either consider Amazon or Vultr. Below is a referral link to Vultr. It is recommended for new users as its clean, simple and fast.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/www.vultr.com\/?ref=6877905\"><img decoding=\"async\" src=\"https:\/\/www.vultr.com\/media\/banner_2.png\" alt=\"\"\/><\/a><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">If you are more adventurous, try adding<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>https via certbot<\/li><li>using ansible to automate<\/li><li>using terraform to generate the instance<\/li><\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">you can download plugin from https:\/\/github.com\/squat\/terraform-provider-vultr<br>and install using https:\/\/www.terraform.io\/docs\/plugins\/basics.html#installing-a-plugin<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">run memory extender swapfile<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">copy swapfile maker which I created to run (https:\/\/github.com\/mirageglobe\/jsf) into remote machine and run. Customise the following steps but on outline its approximately like this:<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p>$ ssh &lt;user&gt;@&lt;ip of server&gt;<\/p><p>$ touch jsk.md<\/p><p># copy the contents of jsk and run<\/p><p>$&nbsp;sh jsf.sh deploy<\/p><\/blockquote>\n\n\n\n<h3 class=\"wp-block-heading\">adding wordpress cli<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">add the official wordpress cli<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p>$ curl -O https:\/\/raw.githubusercontent.com\/wp-cli\/builds\/gh-pages\/phar\/wp-cli.phar<\/p><p>$\u00a0chmod +x wp-cli.phar<\/p><p>$ sudo mv wp-cli.phar \/usr\/local\/bin\/wp<\/p><\/blockquote>\n\n\n\n<h3 class=\"wp-block-heading\">configure wordpress multi-site<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">run as root, and run wordpress installer<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p>$ sudo su<br>$ wp core install &#8211;url=localhost:8000 &#8211;path=&#8221;\/var\/www\/mywordpress&#8221; &#8211;title=Example &#8211;admin_user=supervisor &#8211;admin_password=strongpassword &#8211;admin_email=info@example.com<\/p><\/blockquote>\n\n\n\n<p class=\"wp-block-paragraph\">note that if you are running the statements as root user, you can use &#8211;allow-root<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">wpcli to convert single site to multisite<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">now you can visit the url by typing your ip address in the browser<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p>$ wp core multisite-convert &#8211;path=\/var\/www\/mywordpress<\/p><\/blockquote>\n\n\n\n<h2 class=\"wp-block-heading\">other additional notes<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">getting certbot for debian<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">when adding certbot for nginx on debian, you will need to use add the following to your deb package file<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p>deb http:\/\/ftp.debian.org\/debian stretch-backports main<\/p><\/blockquote>\n\n\n\n<p class=\"wp-block-paragraph\">reference : https:\/\/backports.debian.org\/Instructions\/<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">installing self-signed certificates for localhost<\/h3>\n\n\n\n<ul class=\"wp-block-list\"><li>https:\/\/letsencrypt.org\/docs\/certificates-for-localhost\/<\/li><li>https:\/\/www.digitalocean.com\/community\/tutorials\/how-to-create-a-self-signed-ssl-certificate-for-nginx-in-ubuntu-16-04<\/li><\/ul>\n","protected":false},"excerpt":{"rendered":"<p>setting up a new debian webserver with wordpress on vultr to setup a new machine, I recommend always plan your system with a list of comments (which you can do either starting with &#8220;#&#8221; or &#8220;\/\/&#8221;). For example setting up a simple standalone virtual machine with the following requirements: debian increasing the memory size (optional) [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-902","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/pages.alldaycity.com\/mirageglobe\/wp-json\/wp\/v2\/posts\/902","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pages.alldaycity.com\/mirageglobe\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pages.alldaycity.com\/mirageglobe\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pages.alldaycity.com\/mirageglobe\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/pages.alldaycity.com\/mirageglobe\/wp-json\/wp\/v2\/comments?post=902"}],"version-history":[{"count":4,"href":"https:\/\/pages.alldaycity.com\/mirageglobe\/wp-json\/wp\/v2\/posts\/902\/revisions"}],"predecessor-version":[{"id":923,"href":"https:\/\/pages.alldaycity.com\/mirageglobe\/wp-json\/wp\/v2\/posts\/902\/revisions\/923"}],"wp:attachment":[{"href":"https:\/\/pages.alldaycity.com\/mirageglobe\/wp-json\/wp\/v2\/media?parent=902"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pages.alldaycity.com\/mirageglobe\/wp-json\/wp\/v2\/categories?post=902"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pages.alldaycity.com\/mirageglobe\/wp-json\/wp\/v2\/tags?post=902"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}