{"id":545,"date":"2019-03-05T22:25:02","date_gmt":"2019-03-06T06:25:02","guid":{"rendered":"https:\/\/doubleecpu.com\/?page_id=545"},"modified":"2021-04-19T00:14:35","modified_gmt":"2021-04-19T07:14:35","slug":"configure-wordpress","status":"publish","type":"page","link":"https:\/\/doubleecpu.com\/index.php\/raspian-linux-programs\/wordpress\/configure-wordpress\/","title":{"rendered":"Configure WordPress"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">Enable WordPress Site in Apache<\/h2>\n\n\n\n<p>Each site should have its own root directory (example \/var\/www\/site1.com and \/var\/www\/site2.org) for its domain.<br>Use mkdir to create folder then set permissions and change ownership to www-data<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo mkdir \/var\/www\/site1.com &amp;&amp; sudo mkdir \/var\/www\/site1.com\/{public_html, logs}\nchmod -R 755 \/var\/www\/site1.com \nchown -R www-data:www-data \/var\/www\/site1.com<\/pre>\n\n\n\n<p>Copy the extracted worpress folder in site1.com <\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo mv wordpress\/* \/var\/www\/site1.com\/public_html <\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Activate and disable websites in apache<\/h2>\n\n\n\n<p>Copy the default configuration file for each site <\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">cp \/etc\/apache2\/sites-available\/000-default.conf \/etc\/apache2\/sites-available\/site1.com.conf<br>cp \/etc\/apache2\/sites-available\/000-default.conf \/etc\/apache2\/sites-available\/site2.com.conf<\/pre>\n\n\n\n<p>Edit the Config File for Each Site<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo nano \/etc\/apache2\/sites-available\/site1.com.conf<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">&lt;Directory \/var\/www\/site1.com\/public_html>\n   Require all granted\n&lt;\/Directory>\n&lt;VirtualHost *:80>\n    ServerAdmin webmaster@site1.com\n    ServerName site1.com\n    ServerAlias www.site1.com\n    DocumentRoot \/var\/www\/html\/site1.com\/public_html\n    ErrorLog \/var\/www\/html\/site1.com\/error.log\n    CustomLog \/var\/www\/html\/site1.com\/logs\/access.log combined\n&lt;\/VirtualHost><\/pre>\n\n\n\n<p>Save and Close then enable the config file<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo a2ensite site1.com.conf<\/pre>\n\n\n\n<p>Disable any unused sites<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"> sudo a2dissite 000-default.conf<\/pre>\n\n\n\n<p>Restart Apache webservices <\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo systemctl restart apache2<\/pre>\n\n\n\n<p>The WordPress website should now be running. In a web browser enter http:\/\/localhost this should open the setup-config.php webpage.  Select language to proceed to the welcome screen. Read the webpage information that will be needed to setup WordPress. If all the information is available click the Lets&#8217; go! button.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">Database Name:      wordpress\nUser Name:          root\nPassword:           [password]\nDatabase Host:      site1.com\nTable Prefix:       wp_<\/pre>\n\n\n\n<p>Click Submit to Proceed and then click Run the install button. The next Screen will ask about Title, username, and password for WordPress. Click the Install WordPress button then the WordPress credentials can be used to login. Open a browser and enter the web address http:\/\/localhost\/wp-admin  <br>To start customizing the WordPress site the files in the wp-content folder will need to be configured. <br>To get documentation on setting up and using WordPress go to https:\/\/wordpress.org\/support\/<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Enable WordPress Site in Apache Each site should have its own root directory (example \/var\/www\/site1.com and \/var\/www\/site2.org) for its domain.Use mkdir to create folder then set permissions and change ownership to www-data sudo mkdir \/var\/www\/site1.com &amp;&amp; sudo mkdir \/var\/www\/site1.com\/{public_html, logs} chmod -R 755 \/var\/www\/site1.com chown -R www-data:www-data \/var\/www\/site1.com Copy the extracted worpress folder in site1.com &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/doubleecpu.com\/index.php\/raspian-linux-programs\/wordpress\/configure-wordpress\/\" class=\"more-link\">Read more<span class=\"screen-reader-text\"> &#8220;Configure WordPress&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":473,"menu_order":2,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-545","page","type-page","status-publish","hentry"],"featured_media_urls":[],"_links":{"self":[{"href":"https:\/\/doubleecpu.com\/index.php\/wp-json\/wp\/v2\/pages\/545","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/doubleecpu.com\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/doubleecpu.com\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/doubleecpu.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/doubleecpu.com\/index.php\/wp-json\/wp\/v2\/comments?post=545"}],"version-history":[{"count":3,"href":"https:\/\/doubleecpu.com\/index.php\/wp-json\/wp\/v2\/pages\/545\/revisions"}],"predecessor-version":[{"id":2335,"href":"https:\/\/doubleecpu.com\/index.php\/wp-json\/wp\/v2\/pages\/545\/revisions\/2335"}],"up":[{"embeddable":true,"href":"https:\/\/doubleecpu.com\/index.php\/wp-json\/wp\/v2\/pages\/473"}],"wp:attachment":[{"href":"https:\/\/doubleecpu.com\/index.php\/wp-json\/wp\/v2\/media?parent=545"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}