{"id":29482,"date":"2019-08-16T11:38:56","date_gmt":"2019-08-16T16:38:56","guid":{"rendered":"https:\/\/www.rosehosting.com\/blog\/?p=29482"},"modified":"2022-12-13T14:14:47","modified_gmt":"2022-12-13T20:14:47","slug":"how-to-install-wordpress-with-a-lemp-stack-on-ubuntu-18-04","status":"publish","type":"post","link":"https:\/\/www.rosehosting.com\/blog\/how-to-install-wordpress-with-a-lemp-stack-on-ubuntu-18-04\/","title":{"rendered":"How to Install WordPress with a LEMP Stack on Ubuntu 18.04"},"content":{"rendered":"<div id=\"bsf_rt_marker\"><\/div><p><img decoding=\"async\" class=\"alignnone size-full wp-image-31821\" src=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2019\/08\/how-to-install-wordpress-with-a-lemp-stack-on-ubuntu18.04.jpg\" alt=\"\" width=\"742\" height=\"372\" srcset=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2019\/08\/how-to-install-wordpress-with-a-lemp-stack-on-ubuntu18.04.jpg 742w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2019\/08\/how-to-install-wordpress-with-a-lemp-stack-on-ubuntu18.04-150x75.jpg 150w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2019\/08\/how-to-install-wordpress-with-a-lemp-stack-on-ubuntu18.04-300x150.jpg 300w\" sizes=\"(max-width: 742px) 100vw, 742px\" \/><\/p>\n<p>In this article we will guide you through the steps of installing the latest version of WordPress on an <a href=\"https:\/\/www.rosehosting.com\/ubuntu-hosting.html\" target=\"_blank\" rel=\"noopener noreferrer\">Ubuntu 18.04 VPS<\/a>, including the <a href=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-lemp-on-ubuntu-18-04\/\">installation of Nginx web server, PHP and MySQL database server<\/a>.<\/p>\n<p><img decoding=\"async\" class=\"alignright size-full wp-image-31822\" src=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2019\/08\/install-configure-wordpress-lemp-linux-nginx-mysql-php-stack-on-ubuntu18.04-server.jpg\" alt=\"\" width=\"150\" height=\"150\" \/>WordPress is a free and open-source CMS based on the PHP and MySQL programming languages. Used by millions of people, it is the world\u2019s most popular <a href=\"https:\/\/www.rosehosting.com\/cms-hosting.html\" target=\"_blank\" rel=\"noopener noreferrer\">content management systems<\/a> (or CMS for short). With features such as in-depth theming, thousands of plug-ins, and a huge community, WordPress is probably the most user-friendly CMS you can choose.\u00a0The installation is pretty easy, too &#8211; all you need is to closely follow the steps in this tutorial. Let&#8217;s get started.<\/p>\n<p><!--more--><\/p>\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_82_2 counter-hierarchy ez-toc-counter ez-toc-transparent ez-toc-container-direction\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<label for=\"ez-toc-cssicon-toggle-item-69da4dc7979f9\" class=\"ez-toc-cssicon-toggle-label\"><span class=\"ez-toc-cssicon\"><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><\/label><input type=\"checkbox\"  id=\"ez-toc-cssicon-toggle-item-69da4dc7979f9\"  aria-label=\"Toggle\" \/><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:\/\/www.rosehosting.com\/blog\/how-to-install-wordpress-with-a-lemp-stack-on-ubuntu-18-04\/#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:\/\/www.rosehosting.com\/blog\/how-to-install-wordpress-with-a-lemp-stack-on-ubuntu-18-04\/#Step-1-Log-in-and-Update-the-Server\" >Step 1: Log in and Update the Server<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-wordpress-with-a-lemp-stack-on-ubuntu-18-04\/#Step-2-Install-Nginx-web-server\" >Step 2: Install Nginx web server<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-wordpress-with-a-lemp-stack-on-ubuntu-18-04\/#Step-3-Install-and-Configure-PHP\" >Step 3: Install and Configure PHP<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-wordpress-with-a-lemp-stack-on-ubuntu-18-04\/#Step-4-Install-MySQL-Server-and-Create-a-Database\" >Step 4: Install MySQL Server and Create a Database<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-wordpress-with-a-lemp-stack-on-ubuntu-18-04\/#Step-5-Download-and-Install-WordPress\" >Step 5: Download and Install WordPress<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-wordpress-with-a-lemp-stack-on-ubuntu-18-04\/#Step-6-Configure-Nginx\" >Step 6: Configure Nginx<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-wordpress-with-a-lemp-stack-on-ubuntu-18-04\/#Step-7-Complete-the-WordPress-installation\" >Step 7: Complete the WordPress installation<\/a><\/li><\/ul><\/nav><\/div>\n<h2><span class=\"ez-toc-section\" id=\"Prerequisites\"><\/span><strong>Prerequisites:<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<ul>\n<li>\u00a0<a href=\"https:\/\/www.rosehosting.com\/php-hosting.html\">PHP<\/a> version 7.2 or newer<\/li>\n<li>\u00a0<a href=\"https:\/\/www.rosehosting.com\/mysql-hosting.html\">MySQL<\/a> version 5.6 or greater OR MariaDB version 10.0 or greater.<\/li>\n<li>\u00a0<a href=\"https:\/\/www.rosehosting.com\/nginx-hosting.html\">Nginx<\/a> web server<\/li>\n<li>\u00a0an Ubuntu 18.04 VPS<\/li>\n<li>\u00a0A system user with root privileges, or access to the root account<\/li>\n<\/ul>\n<h2><span class=\"ez-toc-section\" id=\"Step-1-Log-in-and-Update-the-Server\"><\/span><strong>Step 1: Log in and Update the Server<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Login to your Ubuntu 18.04 server via SSH as the root user:<\/p>\n<pre>ssh root@<span style=\"color: #ff0000;\">IP_Address<\/span> -p <span style=\"color: #ff0000;\">Port_number<\/span><\/pre>\n<p>where &#8216;<span style=\"color: #ff0000;\">IP_Address<\/span>&#8216; and &#8216;<span style=\"color: #ff0000;\">Port_number<\/span>&#8216; are the actual IP address of your server and the SSH port.<\/p>\n<p>Then run the following commands to make sure that all packages are updated to their latest releases.<\/p>\n<pre>apt update &amp;&amp; apt upgrade<\/pre>\n<h2><span class=\"ez-toc-section\" id=\"Step-2-Install-Nginx-web-server\"><\/span><strong>Step 2: Install Nginx web server<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>WordPress needs a web server with PHP support to run and render the web pages dynamically. For this, we will install and use the Nginx web server. It is available in the official Ubuntu 18.04 repositories and it can be easily installed using the following command:<\/p>\n<pre>apt -y install nginx<\/pre>\n<p>After the installation is completed, start Nginx and enable it to start automatically after a reboot:<\/p>\n<pre>systemctl start nginx\r\nsystemctl enable nginx<\/pre>\n<p>You can check if the web server is running with this command:<\/p>\n<pre>systemctl status nginx<\/pre>\n<p>The output should look something like this:<\/p>\n<pre>nginx.service - A high performance web server and a reverse proxy server\r\n   Loaded: loaded (\/lib\/systemd\/system\/nginx.service; enabled; vendor preset: enabled)\r\n   Active: active (running) \r\n     Docs: man:nginx(8)\r\n Main PID: 21137 (nginx)\r\n    Tasks: 3 (limit: 2320)\r\n   CGroup: \/system.slice\/nginx.service\r\n           \u00e2\u00e221137 nginx: master process \/usr\/sbin\/nginx -g daemon on; master_process on;\r\n           \u00e2\u00e221138 nginx: worker process\r\n           \u00e2\u00e221139 nginx: worker process<\/pre>\n<p>You can also verify if Nginx is running by accessing <code>http:\/\/Server_IP_Address<\/code> in your preferred web browser.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Step-3-Install-and-Configure-PHP\"><\/span><strong>Step 3: Install and Configure PHP<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>WordPress is built on PHP, so we have to install PHP as well as several PHP extensions required by WordPress in order for it to function properly:<\/p>\n<pre>apt install -y php php-common php-mbstring php-gd php-intl php-xml php-mysql php-mcrypt php-fpm<\/pre>\n<p>Now, open the PHP configuration file, find and uncomment the &#8216;cgi.fix_pathinfo&#8217; line. Open the file with your preferred text editor &#8211; we&#8217;ll be using Nano:<\/p>\n<pre>nano \/etc\/php\/7.2\/fpm\/php.ini<\/pre>\n<p>Then uncomment this line:<\/p>\n<pre>cgi.fix_pathinfo=0<\/pre>\n<p>Save the configuration file and exit the editor. Then restart the PHP-FPM service for the changes to take effect:<\/p>\n<pre>systemctl restart php7.2-fpm.service<\/pre>\n<h2><span class=\"ez-toc-section\" id=\"Step-4-Install-MySQL-Server-and-Create-a-Database\"><\/span><strong>Step 4: Install MySQL Server and Create a Database<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>WordPress needs an empty MySQL database to store its data such as posts, post types, user profiles, etc. So the next step will be to install the MySQL server and create a user and database for the WordPress installation.<\/p>\n<p>MySQL server can be installed using the following command:<\/p>\n<pre>apt install mysql-server<\/pre>\n<p>During the installation of the database server, you will be prompted to set a password for the MySQL root user.<\/p>\n<p>After the installation completes, you can check the version of the installed MySQL database server:<\/p>\n<pre>mysql -V\r\nmysql  Ver 14.14 Distrib 5.7.24, for Linux (x86_64) using  EditLine wrapper<\/pre>\n<p>Additionally, you can run the <code>mysql_secure_installation<\/code> post-installation script to strengthen the security of the database server. We recommend answering with the following answers:<\/p>\n<pre>Set root password? [Y\/n] Y\r\nRemove anonymous users? [Y\/n] Y\r\nDisallow root login remotely? [Y\/n] Y\r\nRemove test database and access to it? [Y\/n] Y\r\nReload privilege tables now? [Y\/n] Y<\/pre>\n<p>Next, log in to the MySQL server as user root and create a new MySQL user and database<\/p>\n<pre>mysql&gt; CREATE DATABASE wordpress;\r\nmysql&gt; GRANT ALL PRIVILEGES ON wordpress.* TO 'wpuser'@'localhost' IDENTIFIED BY '<span style=\"color: #ff0000;\">PASSWORD<\/span>';\r\nmysql&gt; FLUSH PRIVILEGES;\r\nmysql&gt; exit;<\/pre>\n<p>Don\u2019t forget to replace \u2018<span style=\"color: #ff0000;\">PASSWORD<\/span>\u2019 with an actual, strong password.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Step-5-Download-and-Install-WordPress\"><\/span><strong>Step 5: Download and Install WordPress<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>The latest release of WordPress can be downloaded from their official website. At the moment of writing this article it is version 5.2.2. It can be easily downloaded on your Ubuntu 18.04 server using the following command<\/p>\n<pre>wget https:\/\/wordpress.org\/latest.zip<\/pre>\n<p>Once the downloading of the WordPress archive is completed, unpack it to the document root directory of your server<\/p>\n<pre>unzip latest.zip -d \/var\/www\/html\/<\/pre>\n<p>This will create a new &#8216;wordpress&#8217; directory which will contain all files of the WordPress installation.<\/p>\n<pre>chown -R www-data:www-data \/var\/www\/html\/wordpress<\/pre>\n<h2><span class=\"ez-toc-section\" id=\"Step-6-Configure-Nginx\"><\/span>Step 6: Configure Nginx<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Next, in order to be able to access the WordPress site with your domain name, we will have to create an Nginx virtual block for the domain name:<\/p>\n<pre>server {\r\n        listen\t80;\r\n\r\n        server_name <span style=\"color: #ff0000;\">yourdomain.com<\/span> www.<span style=\"color: #ff0000;\">yourdomain.com<\/span>;\r\n        root \/var\/www\/html\/wordpress;\r\n        index index.php index.html index.htm;\r\n\r\n\t    location \/ {\r\n\t        try_files $uri @index_php;\r\n\t    }\r\n\r\n\t    location = \/favicon.ico {\r\n\t        log_not_found off;\r\n\t        access_log off;\r\n\t    }\r\n\t\r\n\t    location ~* \\.(js|css|png|jpg|jpeg|gif|ico)$ {\r\n\t        expires max;\r\n\t        log_not_found off;\r\n\t    }\t\r\n\r\n\t    location = \/robots.txt {\r\n\t        allow all;\r\n\t        log_not_found off;\r\n\t        access_log off;\r\n\t    }\r\n\r\n \t   location ~ \\.php$ {\r\n \t        include snippets\/fastcgi-php.conf;\r\n \t        fastcgi_pass unix:\/run\/php\/php7.2-fpm.sock;\r\n \t        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;\r\n \t        include fastcgi_params;\r\n \t   }\r\n}<\/pre>\n<p><strong>NOTE:\u00a0<\/strong>Don&#8217;t forget to replace<span style=\"color: #ff0000;\"> yourdomain.com<\/span> with your unique registered domain name.<\/p>\n<p>Enable the Nginx virtual block:<\/p>\n<pre>ln -s \/etc\/nginx\/sites-available\/yourdomain.tld \/etc\/nginx\/sites-enabled\/<\/pre>\n<p>You can test if everything is properly configured using the following command:<\/p>\n<pre>nginx -t\r\n\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<p>Once you confirm that everything is OK, restart Nginx for the changes to take effect:<\/p>\n<pre>systemctl restart nginx.service<\/pre>\n<h2><span class=\"ez-toc-section\" id=\"Step-7-Complete-the-WordPress-installation\"><\/span><strong>Step 7: Complete the WordPress installation<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Once all steps above are done, the installation from the command line is completed. You can open your favorite web browser and point it to <code>http:\/\/yourdomain.com<\/code>. You should get the following screen:<\/p>\n<p><img decoding=\"async\" class=\"size-full wp-image-29483 aligncenter\" src=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2019\/01\/wordpress.png\" alt=\"\" width=\"520\" height=\"319\" srcset=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2019\/01\/wordpress.png 520w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2019\/01\/wordpress-150x92.png 150w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2019\/01\/wordpress-300x184.png 300w\" sizes=\"(max-width: 520px) 100vw, 520px\" \/><\/p>\n<p>Select your language and follow the installation wizard to complete the WordPress installation and create your administrative account. Congratulations, you now have WordPressed installed on Ubuntu 18.04 with a LEMP stack.<\/p>\n<hr \/>\n<p><img decoding=\"async\" class=\"alignleft size-full wp-image-31823\" src=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2019\/08\/managed-lemp-stack-wordpress-support-service-ubuntu18.04.jpg\" alt=\"\" width=\"200\" height=\"90\" srcset=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2019\/08\/managed-lemp-stack-wordpress-support-service-ubuntu18.04.jpg 200w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2019\/08\/managed-lemp-stack-wordpress-support-service-ubuntu18.04-150x68.jpg 150w\" sizes=\"(max-width: 200px) 100vw, 200px\" \/>Of course, if you are one of our <a href=\"https:\/\/www.rosehosting.com\/wordpress-hosting.html\" target=\"_blank\" rel=\"noopener noreferrer\">WordPress Hosting<\/a> customers, you don\u2019t have to Install WordPress with LEMP Stack on Ubuntu 18.04, simply ask our admins, sit back and relax. Our admins will Install Install WordPress with LEMP Stack on your Ubuntu 18.04 VPS for you immediately.<\/p>\n<p><span style=\"color: #ff0000;\"><strong>PS.<\/strong><\/span> If you liked this post on <strong>how to install WordPress with LEMP Stack on Ubuntu 18.04<\/strong>, please share it with your friends on the social networks using the buttons below or simply leave a comment in the comments section. Thanks.<\/p>\n<p>An updated version is available here: <a href=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-wordpress-with-lemp-on-ubuntu-20-04\/\">How to Install WordPress with LEMP on Ubuntu 20.04<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this article we will guide you through the steps of installing the latest version of WordPress on an Ubuntu &#8230; <\/p>\n<p class=\"read-more-container\"><a title=\"How to Install WordPress with a LEMP Stack on Ubuntu 18.04\" class=\"read-more button\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-wordpress-with-a-lemp-stack-on-ubuntu-18-04\/#more-29482\" aria-label=\"Read more about How to Install WordPress with a LEMP Stack on Ubuntu 18.04\">Read More<\/a><\/p>\n","protected":false},"author":4,"featured_media":31821,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1710,13,1698],"tags":[292,59,148],"class_list":["post-29482","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-cms-crm-erp","category-tutorials","category-ubuntu","tag-cms","tag-ubuntu","tag-wordpress","generate-columns","tablet-grid-50","mobile-grid-100","grid-parent","grid-33"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.3 (Yoast SEO v27.3) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>How to Install WordPress with a LEMP Stack on Ubuntu 18.04 | RoseHosting<\/title>\n<meta name=\"description\" content=\"How to Install WordPress with a LEMP Stack on Ubuntu 18.04 | RoseHosting\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-wordpress-with-a-lemp-stack-on-ubuntu-18-04\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Install WordPress with a LEMP Stack on Ubuntu 18.04\" \/>\n<meta property=\"og:description\" content=\"How to Install WordPress with a LEMP Stack on Ubuntu 18.04 | RoseHosting\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-wordpress-with-a-lemp-stack-on-ubuntu-18-04\/\" \/>\n<meta property=\"og:site_name\" content=\"RoseHosting\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/RoseHosting\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/rosehosting.helpdesk\" \/>\n<meta property=\"article:published_time\" content=\"2019-08-16T16:38:56+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-12-13T20:14:47+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2019\/08\/how-to-install-wordpress-with-a-lemp-stack-on-ubuntu18.04.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"742\" \/>\n\t<meta property=\"og:image:height\" content=\"372\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Jeff Wilson\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@rosehosting\" \/>\n<meta name=\"twitter:site\" content=\"@rosehosting\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Jeff Wilson\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-wordpress-with-a-lemp-stack-on-ubuntu-18-04\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-wordpress-with-a-lemp-stack-on-ubuntu-18-04\\\/\"},\"author\":{\"name\":\"Jeff Wilson\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#\\\/schema\\\/person\\\/7ce77a842fa6a9a7f8efa186f2353713\"},\"headline\":\"How to Install WordPress with a LEMP Stack on Ubuntu 18.04\",\"datePublished\":\"2019-08-16T16:38:56+00:00\",\"dateModified\":\"2022-12-13T20:14:47+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-wordpress-with-a-lemp-stack-on-ubuntu-18-04\\\/\"},\"wordCount\":852,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-wordpress-with-a-lemp-stack-on-ubuntu-18-04\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2019\\\/08\\\/how-to-install-wordpress-with-a-lemp-stack-on-ubuntu18.04.jpg\",\"keywords\":[\"cms\",\"ubuntu\",\"wordpress\"],\"articleSection\":[\"CMS, CRM, ERP\",\"Tutorials\",\"Ubuntu\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-wordpress-with-a-lemp-stack-on-ubuntu-18-04\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-wordpress-with-a-lemp-stack-on-ubuntu-18-04\\\/\",\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-wordpress-with-a-lemp-stack-on-ubuntu-18-04\\\/\",\"name\":\"How to Install WordPress with a LEMP Stack on Ubuntu 18.04 | RoseHosting\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-wordpress-with-a-lemp-stack-on-ubuntu-18-04\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-wordpress-with-a-lemp-stack-on-ubuntu-18-04\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2019\\\/08\\\/how-to-install-wordpress-with-a-lemp-stack-on-ubuntu18.04.jpg\",\"datePublished\":\"2019-08-16T16:38:56+00:00\",\"dateModified\":\"2022-12-13T20:14:47+00:00\",\"description\":\"How to Install WordPress with a LEMP Stack on Ubuntu 18.04 | RoseHosting\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-wordpress-with-a-lemp-stack-on-ubuntu-18-04\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-wordpress-with-a-lemp-stack-on-ubuntu-18-04\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-wordpress-with-a-lemp-stack-on-ubuntu-18-04\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2019\\\/08\\\/how-to-install-wordpress-with-a-lemp-stack-on-ubuntu18.04.jpg\",\"contentUrl\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2019\\\/08\\\/how-to-install-wordpress-with-a-lemp-stack-on-ubuntu18.04.jpg\",\"width\":742,\"height\":372},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-wordpress-with-a-lemp-stack-on-ubuntu-18-04\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Install WordPress with a LEMP Stack on Ubuntu 18.04\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/\",\"name\":\"RoseHosting.com\",\"description\":\"Premium Linux Tutorials Since 2001\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#organization\",\"name\":\"RoseHosting\",\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/03\\\/android-chrome-192x192-1.png\",\"contentUrl\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/03\\\/android-chrome-192x192-1.png\",\"width\":192,\"height\":192,\"caption\":\"RoseHosting\"},\"image\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/RoseHosting\",\"https:\\\/\\\/x.com\\\/rosehosting\",\"https:\\\/\\\/www.linkedin.com\\\/in\\\/rosehosting\\\/\"],\"description\":\"RoseHosting is a leading Linux hosting provider, serving thousands of clients world-wide since 2001.\",\"email\":\"info@rosehosting.com\",\"telephone\":\"(314) 275-0414\",\"legalName\":\"Rose Web Services LLC\",\"foundingDate\":\"2001-04-02\",\"numberOfEmployees\":{\"@type\":\"QuantitativeValue\",\"minValue\":\"11\",\"maxValue\":\"50\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#\\\/schema\\\/person\\\/7ce77a842fa6a9a7f8efa186f2353713\",\"name\":\"Jeff Wilson\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g\",\"caption\":\"Jeff Wilson\"},\"description\":\"An experienced Linux veteran with many years of experience. Helping other Linux admins with frequent Linux and business-related blog posts on the RoseHosting blog. Techie by choice. Loving nature and travel. Happily married and father of two lovely children.\",\"sameAs\":[\"https:\\\/\\\/www.rosehosting.com\",\"https:\\\/\\\/www.facebook.com\\\/rosehosting.helpdesk\"],\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/author\\\/jwilson\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"How to Install WordPress with a LEMP Stack on Ubuntu 18.04 | RoseHosting","description":"How to Install WordPress with a LEMP Stack on Ubuntu 18.04 | RoseHosting","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.rosehosting.com\/blog\/how-to-install-wordpress-with-a-lemp-stack-on-ubuntu-18-04\/","og_locale":"en_US","og_type":"article","og_title":"How to Install WordPress with a LEMP Stack on Ubuntu 18.04","og_description":"How to Install WordPress with a LEMP Stack on Ubuntu 18.04 | RoseHosting","og_url":"https:\/\/www.rosehosting.com\/blog\/how-to-install-wordpress-with-a-lemp-stack-on-ubuntu-18-04\/","og_site_name":"RoseHosting","article_publisher":"https:\/\/www.facebook.com\/RoseHosting","article_author":"https:\/\/www.facebook.com\/rosehosting.helpdesk","article_published_time":"2019-08-16T16:38:56+00:00","article_modified_time":"2022-12-13T20:14:47+00:00","og_image":[{"width":742,"height":372,"url":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2019\/08\/how-to-install-wordpress-with-a-lemp-stack-on-ubuntu18.04.jpg","type":"image\/jpeg"}],"author":"Jeff Wilson","twitter_card":"summary_large_image","twitter_creator":"@rosehosting","twitter_site":"@rosehosting","twitter_misc":{"Written by":"Jeff Wilson","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-wordpress-with-a-lemp-stack-on-ubuntu-18-04\/#article","isPartOf":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-wordpress-with-a-lemp-stack-on-ubuntu-18-04\/"},"author":{"name":"Jeff Wilson","@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/person\/7ce77a842fa6a9a7f8efa186f2353713"},"headline":"How to Install WordPress with a LEMP Stack on Ubuntu 18.04","datePublished":"2019-08-16T16:38:56+00:00","dateModified":"2022-12-13T20:14:47+00:00","mainEntityOfPage":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-wordpress-with-a-lemp-stack-on-ubuntu-18-04\/"},"wordCount":852,"commentCount":0,"publisher":{"@id":"https:\/\/www.rosehosting.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-wordpress-with-a-lemp-stack-on-ubuntu-18-04\/#primaryimage"},"thumbnailUrl":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2019\/08\/how-to-install-wordpress-with-a-lemp-stack-on-ubuntu18.04.jpg","keywords":["cms","ubuntu","wordpress"],"articleSection":["CMS, CRM, ERP","Tutorials","Ubuntu"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.rosehosting.com\/blog\/how-to-install-wordpress-with-a-lemp-stack-on-ubuntu-18-04\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-wordpress-with-a-lemp-stack-on-ubuntu-18-04\/","url":"https:\/\/www.rosehosting.com\/blog\/how-to-install-wordpress-with-a-lemp-stack-on-ubuntu-18-04\/","name":"How to Install WordPress with a LEMP Stack on Ubuntu 18.04 | RoseHosting","isPartOf":{"@id":"https:\/\/www.rosehosting.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-wordpress-with-a-lemp-stack-on-ubuntu-18-04\/#primaryimage"},"image":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-wordpress-with-a-lemp-stack-on-ubuntu-18-04\/#primaryimage"},"thumbnailUrl":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2019\/08\/how-to-install-wordpress-with-a-lemp-stack-on-ubuntu18.04.jpg","datePublished":"2019-08-16T16:38:56+00:00","dateModified":"2022-12-13T20:14:47+00:00","description":"How to Install WordPress with a LEMP Stack on Ubuntu 18.04 | RoseHosting","breadcrumb":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-wordpress-with-a-lemp-stack-on-ubuntu-18-04\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.rosehosting.com\/blog\/how-to-install-wordpress-with-a-lemp-stack-on-ubuntu-18-04\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-wordpress-with-a-lemp-stack-on-ubuntu-18-04\/#primaryimage","url":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2019\/08\/how-to-install-wordpress-with-a-lemp-stack-on-ubuntu18.04.jpg","contentUrl":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2019\/08\/how-to-install-wordpress-with-a-lemp-stack-on-ubuntu18.04.jpg","width":742,"height":372},{"@type":"BreadcrumbList","@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-wordpress-with-a-lemp-stack-on-ubuntu-18-04\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.rosehosting.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to Install WordPress with a LEMP Stack on Ubuntu 18.04"}]},{"@type":"WebSite","@id":"https:\/\/www.rosehosting.com\/blog\/#website","url":"https:\/\/www.rosehosting.com\/blog\/","name":"RoseHosting.com","description":"Premium Linux Tutorials Since 2001","publisher":{"@id":"https:\/\/www.rosehosting.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.rosehosting.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.rosehosting.com\/blog\/#organization","name":"RoseHosting","url":"https:\/\/www.rosehosting.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/03\/android-chrome-192x192-1.png","contentUrl":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/03\/android-chrome-192x192-1.png","width":192,"height":192,"caption":"RoseHosting"},"image":{"@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/RoseHosting","https:\/\/x.com\/rosehosting","https:\/\/www.linkedin.com\/in\/rosehosting\/"],"description":"RoseHosting is a leading Linux hosting provider, serving thousands of clients world-wide since 2001.","email":"info@rosehosting.com","telephone":"(314) 275-0414","legalName":"Rose Web Services LLC","foundingDate":"2001-04-02","numberOfEmployees":{"@type":"QuantitativeValue","minValue":"11","maxValue":"50"}},{"@type":"Person","@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/person\/7ce77a842fa6a9a7f8efa186f2353713","name":"Jeff Wilson","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g","caption":"Jeff Wilson"},"description":"An experienced Linux veteran with many years of experience. Helping other Linux admins with frequent Linux and business-related blog posts on the RoseHosting blog. Techie by choice. Loving nature and travel. Happily married and father of two lovely children.","sameAs":["https:\/\/www.rosehosting.com","https:\/\/www.facebook.com\/rosehosting.helpdesk"],"url":"https:\/\/www.rosehosting.com\/blog\/author\/jwilson\/"}]}},"_links":{"self":[{"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/posts\/29482","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/comments?post=29482"}],"version-history":[{"count":3,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/posts\/29482\/revisions"}],"predecessor-version":[{"id":44238,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/posts\/29482\/revisions\/44238"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/media\/31821"}],"wp:attachment":[{"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/media?parent=29482"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/categories?post=29482"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/tags?post=29482"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}