{"id":5663,"date":"2017-01-21T06:36:12","date_gmt":"2017-01-21T06:36:12","guid":{"rendered":"https:\/\/www.testingdocs.com\/questions\/?p=5663"},"modified":"2021-09-06T04:43:30","modified_gmt":"2021-09-06T04:43:30","slug":"install-wordpress-on-the-linux-machine","status":"publish","type":"post","link":"https:\/\/www.testingdocs.com\/questions\/install-wordpress-on-the-linux-machine\/","title":{"rendered":"Install WordPress on the Linux machine"},"content":{"rendered":"<h3><span id=\"Overview\">Overview<\/span><\/h3>\n<p>In this tutorial, we will go through the steps involved to install WordPress CMS (Content Management System)on the Linux machine.<\/p>\n<h3>About WordPress<\/h3>\n<p>WordPress is open-source web software that we can use to create a website or blog. WordPress powers more than 30% of the websites on the internet. WordPress is free software to use for any website or blog both personal or commercial purposes without paying a license.<\/p>\n<p>WordPress is powered by thousands of themes and plugins. We can easily customize the look &amp; feel and add functionality to your websites on the fly.<\/p>\n<h3><span id=\"Install_Apache_Web_Server\">Install Apache Web Server<\/span><\/h3>\n<p><strong><a href=\"https:\/\/www.testingdocs.com\/install-apache-http-server-on-ubuntu-linux\/\">https:\/\/www.testingdocs.com\/install-apache-http-server-on-ubuntu-linux\/<\/a><\/strong><\/p>\n<h3><span id=\"Install_WordPress\">Install WordPress<\/span><\/h3>\n<p>To install WordPress, issue the following command in the terminal window.<\/p>\n<pre>$ sudo apt install wordpress<\/pre>\n<h3><span id=\"Install_PHP\">Install PHP<\/span><\/h3>\n<p>PHP is the programming language used to build and maintain WordPress. Newer versions of PHP are faster and more secure, so staying up to date will help your site\u2019s overall performance and security. The minimum recommended version of PHP is 7.4.<\/p>\n<p>Install the PHP latest version on the machine.<\/p>\n<pre>$ sudo apt install php libapache2-mod-php php-mysql<\/pre>\n<h3><span id=\"Install_MySQL\">Install MySQL<\/span><\/h3>\n<p><strong><a href=\"https:\/\/www.testingdocs.com\/install-mysql-server-on-linux\/\">https:\/\/www.testingdocs.com\/install-mysql-server-on-linux\/<\/a><\/strong><\/p>\n<h3><span id=\"Create_a_Database_user\">Create a Database user<\/span><\/h3>\n<p>Create a database user and grant ALL PRIVILEGES to the user.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-6555\" src=\"https:\/\/www.testingdocs.com\/questions\/wp-content\/uploads\/create-wordpress-user-and-grant-access.png\" alt=\"create wordpress user and grant access\" width=\"1920\" height=\"1080\" title=\"\" srcset=\"https:\/\/www.testingdocs.com\/questions\/wp-content\/uploads\/create-wordpress-user-and-grant-access.png 1920w, https:\/\/www.testingdocs.com\/questions\/wp-content\/uploads\/create-wordpress-user-and-grant-access-300x169.png 300w, https:\/\/www.testingdocs.com\/questions\/wp-content\/uploads\/create-wordpress-user-and-grant-access-1024x576.png 1024w, https:\/\/www.testingdocs.com\/questions\/wp-content\/uploads\/create-wordpress-user-and-grant-access-768x432.png 768w, https:\/\/www.testingdocs.com\/questions\/wp-content\/uploads\/create-wordpress-user-and-grant-access-1536x864.png 1536w\" sizes=\"auto, (max-width: 1920px) 100vw, 1920px\" \/><\/p>\n<h3><span id=\"Apache_Configuration\">Apache Configuration<\/span><\/h3>\n<p>Navigate to <strong>\/ect\/apache2\/sites-available<\/strong><\/p>\n<p>Create wordpress.conf<\/p>\n<p>&nbsp;<\/p>\n<p>Add the following code to the conf file.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">Alias \/blog \/usr\/share\/wordpress\r\n&lt;Directory \/usr\/share\/wordpress&gt;\r\n    Options FollowSymLinks\r\n    AllowOverride Limit Options FileInfo\r\n    DirectoryIndex index.php\r\n    Order allow,deny\r\n    Allow from all\r\n&lt;\/Directory&gt;\r\n&lt;Directory \/usr\/share\/wordpress\/wp-content&gt;\r\n    Options FollowSymLinks\r\n    Order allow,deny\r\n    Allow from all\r\n&lt;\/Directory&gt;<\/pre>\n<p>&nbsp;<\/p>\n<p>Navigate to <strong>\/etc\/wordpress<\/strong><\/p>\n<p>Create a file <strong>config-localhost.php<\/strong> file.<\/p>\n<p>Add the database information to the file.<\/p>\n<p>&nbsp;<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">&lt;?php\r\ndefine('DB_NAME', 'your_WordPress_DB_goes_here');\r\ndefine('DB_USER', 'your_DB_User_goes_here');\r\ndefine('DB_PASSWORD', 'your_DB_User_Password_goes_here');\r\ndefine('DB_HOST', 'localhost');\r\ndefine('DB_COLLATE', 'utf8_general_ci');\r\ndefine('WP_CONTENT_DIR', '\/usr\/share\/wordpress\/wp-content');\r\n?&gt;<\/pre>\n<p>&nbsp;<\/p>\n<h3><span id=\"Configure_WordPress\">Configure WordPress<\/span><\/h3>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-6554\" src=\"https:\/\/www.testingdocs.com\/questions\/wp-content\/uploads\/wordpress-web-install.png\" alt=\"wordpress web install\" width=\"1920\" height=\"1080\" title=\"\" srcset=\"https:\/\/www.testingdocs.com\/questions\/wp-content\/uploads\/wordpress-web-install.png 1920w, https:\/\/www.testingdocs.com\/questions\/wp-content\/uploads\/wordpress-web-install-300x169.png 300w, https:\/\/www.testingdocs.com\/questions\/wp-content\/uploads\/wordpress-web-install-1024x576.png 1024w, https:\/\/www.testingdocs.com\/questions\/wp-content\/uploads\/wordpress-web-install-768x432.png 768w, https:\/\/www.testingdocs.com\/questions\/wp-content\/uploads\/wordpress-web-install-1536x864.png 1536w\" sizes=\"auto, (max-width: 1920px) 100vw, 1920px\" \/><\/p>\n<h3><\/h3>\n<p>&nbsp;<\/p>\n<p>For more information on WordPress, visit the official website:<br \/>\n<strong><a href=\"https:\/\/wordpress.org\/\" rel=\"noopener\">https:\/\/wordpress.org\/<\/a><\/strong><\/p>\n<!--themify_builder_content-->\n<div id=\"themify_builder_content-5663\" data-postid=\"5663\" class=\"themify_builder_content themify_builder_content-5663 themify_builder tf_clear\">\n    <\/div>\n<!--\/themify_builder_content-->\n","protected":false},"excerpt":{"rendered":"<p>Overview In this tutorial, we will go through the steps involved to install WordPress CMS (Content Management System)on the Linux machine. About WordPress WordPress is open-source web software that we can use to create a website or blog. WordPress powers more than 30% of the websites on the internet. WordPress is free software to use [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[17],"tags":[],"class_list":["post-5663","post","type-post","status-publish","format-standard","hentry","category-linux","has-post-title","has-post-date","has-post-category","has-post-tag","has-post-comment","has-post-author",""],"_links":{"self":[{"href":"https:\/\/www.testingdocs.com\/questions\/wp-json\/wp\/v2\/posts\/5663","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.testingdocs.com\/questions\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.testingdocs.com\/questions\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.testingdocs.com\/questions\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.testingdocs.com\/questions\/wp-json\/wp\/v2\/comments?post=5663"}],"version-history":[{"count":19,"href":"https:\/\/www.testingdocs.com\/questions\/wp-json\/wp\/v2\/posts\/5663\/revisions"}],"predecessor-version":[{"id":20534,"href":"https:\/\/www.testingdocs.com\/questions\/wp-json\/wp\/v2\/posts\/5663\/revisions\/20534"}],"wp:attachment":[{"href":"https:\/\/www.testingdocs.com\/questions\/wp-json\/wp\/v2\/media?parent=5663"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.testingdocs.com\/questions\/wp-json\/wp\/v2\/categories?post=5663"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.testingdocs.com\/questions\/wp-json\/wp\/v2\/tags?post=5663"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}