{"id":5937,"date":"2024-03-09T11:54:22","date_gmt":"2024-03-09T11:54:22","guid":{"rendered":"https:\/\/natsav.com\/blog\/?p=5937"},"modified":"2024-03-11T12:32:28","modified_gmt":"2024-03-11T12:32:28","slug":"install-wordpress-with-lamp-stack-on-ubuntu","status":"publish","type":"post","link":"https:\/\/natsav.com\/blog\/install-wordpress-with-lamp-stack-on-ubuntu\/","title":{"rendered":"How to Install WordPress with LAMP Stack on Ubuntu"},"content":{"rendered":"<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_68_1 counter-hierarchy ez-toc-counter ez-toc-light-blue ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title \" >Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/natsav.com\/blog\/install-wordpress-with-lamp-stack-on-ubuntu\/#Prerequisites\" title=\"Prerequisites:\">Prerequisites:<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/natsav.com\/blog\/install-wordpress-with-lamp-stack-on-ubuntu\/#1_Update_Packages\" title=\"1. Update Packages:\">1. Update Packages:<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/natsav.com\/blog\/install-wordpress-with-lamp-stack-on-ubuntu\/#2_LAMP_Stack\" title=\"2. LAMP Stack:\">2. LAMP Stack:<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/natsav.com\/blog\/install-wordpress-with-lamp-stack-on-ubuntu\/#3_Additional_PHP_Extensions\" title=\"3. Additional PHP Extensions:\">3. Additional PHP Extensions:<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/natsav.com\/blog\/install-wordpress-with-lamp-stack-on-ubuntu\/#4_Install_WordPress\" title=\"4. Install WordPress:\">4. Install WordPress:<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/natsav.com\/blog\/install-wordpress-with-lamp-stack-on-ubuntu\/#5_Move_WordPress_Files\" title=\"5. Move WordPress Files:\">5. Move WordPress Files:<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/natsav.com\/blog\/install-wordpress-with-lamp-stack-on-ubuntu\/#6_Configure_WordPress\" title=\"6. Configure WordPress:\">6. Configure WordPress:<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/natsav.com\/blog\/install-wordpress-with-lamp-stack-on-ubuntu\/#7_Enable_Apache_Rewrite_Module\" title=\"7. Enable Apache Rewrite Module:\">7. Enable Apache Rewrite Module:<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/natsav.com\/blog\/install-wordpress-with-lamp-stack-on-ubuntu\/#8_Complete_Installation\" title=\"8. Complete Installation:\">8. Complete Installation:<\/a><\/li><\/ul><\/nav><\/div>\n<h2><span class=\"ez-toc-section\" id=\"Prerequisites\"><\/span><span style=\"text-decoration: underline;\"><strong>Prerequisites:<\/strong><\/span><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>a.Ubuntu 22.04 LTS <a href=\"https:\/\/www.natsav.com\/linux-vps-server-hosting.php\"><strong>VPS Server<\/strong><\/a><br \/>\na. Root or non-root user with Sudo privileges<\/p>\n<h2><span class=\"ez-toc-section\" id=\"1_Update_Packages\"><\/span><span style=\"text-decoration: underline;\"><strong>1. Update Packages:<\/strong><\/span><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Open a terminal and run the following commands to update your server:<br \/>\n#sudo apt update<br \/>\n#sudo apt upgrade<\/p>\n<h2><span class=\"ez-toc-section\" id=\"2_LAMP_Stack\"><\/span><span style=\"text-decoration: underline;\"><strong>2. LAMP Stack:<\/strong><\/span><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Install the LAMP stack (Linux, Apache, MySQL, PHP):<br \/>\n#sudo apt install apache2 mysql-server php libapache2-mod-php php-mysql<br \/>\nDuring the MySQL installation, set a strong root password and remember it.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"3_Additional_PHP_Extensions\"><\/span><span style=\"text-decoration: underline;\"><strong>3. Additional PHP Extensions:<\/strong><\/span><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Install some additional PHP extensions required by WordPress:<br \/>\n#sudo apt install php-curl php-gd php-mbstring php-xml php-xmlrpc php-zip<\/p>\n<h2><span class=\"ez-toc-section\" id=\"4_Install_WordPress\"><\/span><span style=\"text-decoration: underline;\"><strong>4. Install WordPress:<\/strong><\/span><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Download and Extract WordPress:<br \/>\nDownload the latest version of WordPress:<br \/>\n#wget https:\/\/wordpress.org\/latest.tar.gz<br \/>\nExtract the archive:<br \/>\n#tar -zxvf latest.tar.gz<\/p>\n<h2><span class=\"ez-toc-section\" id=\"5_Move_WordPress_Files\"><\/span><span style=\"text-decoration: underline;\"><strong>5. Move WordPress Files:<\/strong><\/span><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Move the WordPress files to the Apache document root directory:<br \/>\nsudo mv wordpress\/* \/var\/www\/html\/<br \/>\nSet the correct permissions:<br \/>\nsudo chown -R www-data:www-data \/var\/www\/html\/<\/p>\n<h2><span class=\"ez-toc-section\" id=\"6_Configure_WordPress\"><\/span><span style=\"text-decoration: underline;\"><strong>6. Configure WordPress:<\/strong><\/span><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Rename the sample configuration file:<br \/>\nsudo cp \/var\/www\/html\/wp-config-sample.php \/var\/www\/html\/wp-config.php<br \/>\nOpen the configuration file for editing:<br \/>\nsudo nano \/var\/www\/html\/wp-config.php<br \/>\nUpdate the database settings with the MySQL credentials you created earlier.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"7_Enable_Apache_Rewrite_Module\"><\/span><span style=\"text-decoration: underline;\"><strong>7. Enable Apache Rewrite Module:<\/strong><\/span><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>#sudo a2enmod rewrite<br \/>\nRestart Apache:<br \/>\n#sudo systemctl restart apache2<\/p>\n<h2><span class=\"ez-toc-section\" id=\"8_Complete_Installation\"><\/span><span style=\"text-decoration: underline;\"><strong>8. Complete Installation:<\/strong><\/span><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Open your web browser and navigate to your server&#8217;s IP address or domain.<br \/>\nFollow the WordPress installation wizard, providing the necessary information.<br \/>\nOnce the installation is complete, log in to your WordPress dashboard.<br \/>\nThat&#8217;s it! You have successfully installed WordPress on Ubuntu using the LAMP stack.<\/p>\n<p>The advanced hosting product offers the most competitive pricing while ensuring reliable and fast server performance,cloud server india, <strong><a href=\"https:\/\/www.natsav.com\/linux-vps-server-hosting.php\">best cloud hosting in india<\/a><\/strong>, cheap cloud hosting india,cloud server cost in india,cloud server price in india,cloud server providers in india,cloud hosting price in,india with comprehensive 24\/7 technical support.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Prerequisites: a.Ubuntu 22.04 LTS VPS Server a. Root or non-root user with Sudo privileges 1. Update Packages: Open a terminal and run the following commands to update your server: #sudo apt update #sudo apt upgrade 2. LAMP Stack: Install the LAMP stack (Linux, Apache, MySQL, PHP): #sudo apt install apache2 mysql-server php libapache2-mod-php php-mysql During [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":5938,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[255],"tags":[],"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"https:\/\/i0.wp.com\/natsav.com\/blog\/wp-content\/uploads\/2024\/03\/How-to-Install-WordPress-with-LAMP-Stack-on-Ubuntu-e1709985251305.png?fit=585%2C259&ssl=1","jetpack-related-posts":[],"_links":{"self":[{"href":"https:\/\/natsav.com\/blog\/wp-json\/wp\/v2\/posts\/5937"}],"collection":[{"href":"https:\/\/natsav.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/natsav.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/natsav.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/natsav.com\/blog\/wp-json\/wp\/v2\/comments?post=5937"}],"version-history":[{"count":7,"href":"https:\/\/natsav.com\/blog\/wp-json\/wp\/v2\/posts\/5937\/revisions"}],"predecessor-version":[{"id":5951,"href":"https:\/\/natsav.com\/blog\/wp-json\/wp\/v2\/posts\/5937\/revisions\/5951"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/natsav.com\/blog\/wp-json\/wp\/v2\/media\/5938"}],"wp:attachment":[{"href":"https:\/\/natsav.com\/blog\/wp-json\/wp\/v2\/media?parent=5937"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/natsav.com\/blog\/wp-json\/wp\/v2\/categories?post=5937"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/natsav.com\/blog\/wp-json\/wp\/v2\/tags?post=5937"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}