{"id":81,"date":"2016-04-03T15:57:48","date_gmt":"2016-04-03T22:57:48","guid":{"rendered":"http:\/\/www.eckmandesign.com\/blog\/?p=81"},"modified":"2016-12-05T10:39:37","modified_gmt":"2016-12-05T18:39:37","slug":"how-to-install-linux-nginx-mysql-php-lemp-stack-on-ubuntu-14-04-on-digitalocean","status":"publish","type":"post","link":"https:\/\/www.eckmandesign.com\/blog\/how-to-install-linux-nginx-mysql-php-lemp-stack-on-ubuntu-14-04-on-digitalocean\/","title":{"rendered":"How To Install Linux, nginx, MySQL, PHP (LEMP) stack on Ubuntu 14.04 on DigitalOcean"},"content":{"rendered":"<p>In this guide, we will quickly provide instructions on\u00a0how to install a LEMP stack on an Ubuntu 14.04 server on Digital Ocean. The Ubuntu operating system takes care of the first requirement.<\/p>\n<p>You can signup for Digital Ocean\u00a0<a href=\"https:\/\/www.digitalocean.com\/\" target=\"_blank\">here<\/a>\u00a0and deploy a SSD server in less than a minute.<\/p>\n<h2>Installing nginx<\/h2>\n<pre class=\"code-pre \"><code>sudo apt-get update\r\nsudo apt-get install nginx<\/code><\/pre>\n<p>Next, you&#8217;ll want to check the web server to see if nginx is up and running. In your Digital Ocean panel grab the IP address of the droplet and enter it in to your browser. If everything went well you&#8217;ll see the nginx welcome screen.<\/p>\n<h2>Install MySQL<\/h2>\n<p>Now that we have the web server up, we need to install the MySQL database to store all the information for WordPress. To install MySQL type the command:<\/p>\n<pre class=\"code-pre \"><code>sudo apt-get install mysql-server<\/code><\/pre>\n<p>It&#8217;s going to ask for you to create an admin password. Type in a strong password and keep it somewhere safe.<\/p>\n<p>Next type in:<\/p>\n<pre class=\"code-pre \"><code>sudo mysql_install_db<\/code><\/pre>\n<pre class=\"code-pre \"><code>sudo mysql_secure_installation<\/code><\/pre>\n<p>These two commands will create the directory structure for MySQL and run a security script to remove some of the defaults and fake user data. You will be prompted for the password that you had created in the previous step. It will also ask you if you want to change your password. You\u00a0can skip this since you just created a new password.<\/p>\n<h2>Installing PHP<\/h2>\n<p>Ok, we&#8217;re just about halfway done. We&#8217;ve installed the webserver, the database, and now all we&#8217;ve got left is to install PHP and WordPress. I promise, this rest will go about as quickly and simply as the first half.<\/p>\n<p>Type this command to install PHP and php5-FPM:<\/p>\n<pre class=\"code-pre \"><code>sudo apt-get install php5-fpm php5-mysql<\/code><\/pre>\n<p>Next, you&#8217;ll need to edit the config files:<\/p>\n<pre class=\"code-pre \"><code>sudo nano \/etc\/php5\/fpm\/php.ini<\/code><\/pre>\n<p>What you&#8217;re going to edit is the link that contains &#8216;cgi.fix_pathinfo&#8217;. You can scroll through the file or search for the line. You need to uncomment the line by removing the # and the setting the value to 0.<\/p>\n<pre class=\"code-pre \"><code>cgi.fix_pathinfo=0<\/code><\/pre>\n<p>Save and close the file. To make the changes take effect, restart the services:<\/p>\n<pre class=\"code-pre \"><code>sudo service php5-fpm restart\r\n<\/code><\/pre>\n<h2>Configuring nginx to use the PHP processor<\/h2>\n<p>We&#8217;ve got to edit the server block to use the PHP processor. To do this type this into the command line:<\/p>\n<pre class=\"code-pre \"><code>sudo nano \/etc\/nginx\/sites-available\/default<\/code><\/pre>\n<p>Edit the file by making the following changes:<\/p>\n<pre>server {\r\n    listen 80 default_server;\r\n    listen [::]:80 default_server ipv6only=on;\r\n\r\n    root \/usr\/share\/nginx\/html;\r\n    index <span class=\"highlight\" style=\"color: #ff0000;\">index.php<\/span> index.html index.htm;\r\n\r\n    server_name <span class=\"highlight\" style=\"color: #ff0000;\">server_domain_name_or_IP<\/span>;\r\n\r\n    location \/ {\r\n        try_files $uri $uri\/ =404;\r\n    }\r\n\r\n    <span style=\"color: #ff0000;\"><span class=\"highlight\">error_page 404 \/404.html;<\/span>\r\n    <span class=\"highlight\">error_page 500 502 503 504 \/50x.html;<\/span>\r\n    <span class=\"highlight\">location = \/50x.html {<\/span>\r\n        <span class=\"highlight\">root \/usr\/share\/nginx\/html;<\/span>\r\n    <span class=\"highlight\">}<\/span>\r\n\r\n    <span class=\"highlight\">location ~ \\.php$ {<\/span>\r\n        <span class=\"highlight\">try_files $uri =404;<\/span>\r\n        <span class=\"highlight\">fastcgi_split_path_info ^(.+\\.php)(\/.+)$;<\/span>\r\n        <span class=\"highlight\">fastcgi_pass unix:\/var\/run\/php5-fpm.sock;<\/span>\r\n        <span class=\"highlight\">fastcgi_index index.php;<\/span>\r\n        <span class=\"highlight\">fastcgi_param SCRIPT_FILENAME  $document_root$fastcgi_script_name;<\/span>\r\n        <span class=\"highlight\">include fastcgi_params;<\/span>\r\n    <span class=\"highlight\">}<\/span><\/span>\r\n}<\/pre>\n<p>To apply the changes restart nginx:<\/p>\n<pre class=\"code-pre \"><code>sudo service nginx restart<\/code><\/pre>\n<h2>Creating the MySQL Database the WordPress User<\/h2>\n<p>From the console enter:<\/p>\n<pre class=\"code-pre \"><code>mysql -u root -p<\/code><\/pre>\n<p>Enter a password for the root MySQL user when prompted.<\/p>\n<p>Next create a database, you can use any name of your choice, and it&#8217;s advisable that you use something other than &#8216;<strong>wordpress<\/strong>&#8216;, but for this example we&#8217;ll use it for simplicity.<\/p>\n<pre>CREATE DATABASE <span class=\"highlight\">wordpress<\/span>;\r\n<\/pre>\n<p>Now we&#8217;ve got to create a user for the, again for the sake of simplicity we are going to use &#8216;wordpressuser&#8217; and &#8216;password&#8217;, but you should absolutely use other values to decrease the chance someone can guess the username and password.<\/p>\n<pre>CREATE USER <span class=\"highlight\">wordpressuser<\/span>@localhost IDENTIFIED BY '<span class=\"highlight\">password<\/span>';<\/pre>\n<p>To grant access for this user to the database type in the following command:<\/p>\n<pre>GRANT ALL PRIVILEGES ON <span class=\"highlight\">wordpress<\/span>.* TO <span class=\"highlight\">wordpressuser<\/span>@localhost;<\/pre>\n<pre class=\"code-pre \"><code>FLUSH PRIVILEGES;<\/code><\/pre>\n<pre class=\"code-pre \"><code>exit<\/code><\/pre>\n<p>That completes the database user creation for WordPress.<\/p>\n<h2>Download and Install WordPress<\/h2>\n<p>Grab the latest version of WordPress and extract the contents:<\/p>\n<pre class=\"code-pre \"><code>cd ~\r\nwget http:\/\/wordpress.org\/latest.tar.gz<\/code><\/pre>\n<pre class=\"code-pre \"><code>tar xzvf latest.tar.gz<\/code><\/pre>\n<p>Install some other components we&#8217;ll need:<\/p>\n<pre class=\"code-pre \"><code>sudo apt-get update\r\nsudo apt-get install php5-gd libssh2-php<\/code><\/pre>\n<h2>Configure WordPress<\/h2>\n<p>Head over the directory we extracted WordPress to:<\/p>\n<pre class=\"code-pre \"><code>cd ~\/wordpress<\/code><\/pre>\n<p>Copy over the sample config file and rename it.<\/p>\n<pre class=\"code-pre \"><code>cp wp-config-sample.php wp-config.php<\/code><\/pre>\n<p>Edit the new config file:<\/p>\n<pre class=\"code-pre \"><code>nano wp-config.php<\/code><\/pre>\n<p>Replace the text in red with your unique values:<\/p>\n<pre>. . .\r\n\/\/ ** MySQL settings - You can get this info from your web host ** \/\/\r\n\/** The name of the database for WordPress *\/\r\ndefine('DB_NAME', '<span class=\"highlight\" style=\"color: #ff0000;\">wordpress<\/span>');\r\n\r\n\/** MySQL database username *\/\r\ndefine('DB_USER', '<span class=\"highlight\" style=\"color: #ff0000;\">wordpressuser<\/span>');\r\n\r\n\/** MySQL database password *\/\r\ndefine('DB_PASSWORD', '<span class=\"highlight\" style=\"color: #ff0000;\">password<\/span>');\r\n. . .<\/pre>\n<h2>Copy the files over to the document root<\/h2>\n<p>We&#8217;re going to change the default location of where nginx stores it&#8217;s document root from\u00a0\/usr\/share\/nginx\/html\/ to\u00a0\/var\/www\/html\/<\/p>\n<p>Type the following in:<\/p>\n<pre class=\"code-pre \"><code>sudo mkdir -p \/var\/www\/html<\/code><\/pre>\n<pre class=\"code-pre \"><code>sudo rsync -avP ~\/wordpress\/ \/var\/www\/html\/<\/code><\/pre>\n<pre class=\"code-pre \"><code>cd \/var\/www\/html\/<\/code><\/pre>\n<p>Grant nginx permissions to the directory.<\/p>\n<pre>sudo chown -R <span class=\"highlight\">www-data<\/span>:www-data \/var\/www\/html\/*<\/pre>\n<p>Create the uploads directory and grant access to nginx.<\/p>\n<pre class=\"code-pre \"><code>mkdir wp-content\/uploads<\/code><\/pre>\n<pre class=\"code-pre \"><code>sudo chown -R www-data:www-data \/var\/www\/html\/wp-content\/uploads<\/code><\/pre>\n<h2>Modify Nginx Server Blocks<\/h2>\n<p>Copy the default block and create one for WordPress:<\/p>\n<pre class=\"code-pre \"><code>sudo cp \/etc\/nginx\/sites-available\/default \/etc\/nginx\/sites-available\/wordpress<\/code><\/pre>\n<p>Open the new file and make the following changes:<\/p>\n<pre class=\"code-pre \"><code>sudo nano \/etc\/nginx\/sites-available\/wordpress<\/code><\/pre>\n<pre>server {\r\n        listen 80 default_server;\r\n        listen [::]:80 default_server ipv6only=on;\r\n\r\n        root <span class=\"highlight\" style=\"color: #ff0000;\">\/var\/www\/html<\/span>;\r\n        index <span class=\"highlight\" style=\"color: #ff0000;\">index.php<\/span> index.html index.htm;\r\n\r\n        server_name <span class=\"highlight\" style=\"color: #ff0000;\">your_domain.com<\/span>;\r\n\r\n        location \/ {\r\n                <span class=\"highlight\" style=\"color: #ff0000;\">#<\/span> try_files $uri $uri\/ =404;\r\n                try_files $uri $uri\/ <span class=\"highlight\" style=\"color: #ff0000;\">\/index.php?q=$uri&amp;$args<\/span>;\r\n        }\r\n\r\n        error_page 404 \/404.html;\r\n\r\n        error_page 500 502 503 504 \/50x.html;\r\n        location = \/50x.html {\r\n                root \/usr\/share\/nginx\/html;\r\n        }\r\n\r\n        location ~ \\.php$ {\r\n                try_files $uri =404;\r\n                fastcgi_split_path_info ^(.+\\.php)(\/.+)$;\r\n                fastcgi_pass unix:\/var\/run\/php5-fpm.sock;\r\n                fastcgi_index index.php;\r\n                include fastcgi_params;\r\n        }\r\n}<\/pre>\n<p>Copy the file over to the sites-enabled directory:<\/p>\n<pre class=\"code-pre \"><code>sudo ln -s \/etc\/nginx\/sites-available\/wordpress \/etc\/nginx\/sites-enabled\/<\/code><\/pre>\n<p>Remove the old file:<\/p>\n<pre class=\"code-pre \"><code>sudo rm \/etc\/nginx\/sites-enabled\/default<\/code><\/pre>\n<p>Restart the services:<\/p>\n<pre class=\"code-pre \"><code>sudo service nginx restart\r\nsudo service php5-fpm restart<\/code><\/pre>\n<p>Congrats! That&#8217;s it&#8217;s all you&#8217;ve got to do is type in your domain name into a browser and configure the rest of your site.<\/p>\n<p>A few notes, if you&#8217;re having issues with updating or installing plugins, you can read up on how to fix it here:\u00a0<a href=\"https:\/\/www.digitalocean.com\/community\/tutorials\/how-to-configure-secure-updates-and-installations-in-wordpress-on-ubuntu\" target=\"_blank\">How To Configure Secure Updates and Installations in WordPress on Ubuntu<\/a><\/p>\n<h2>PHP-FPM: Socket vs TCP\/IP and sysctl tweaking<\/h2>\n<p>Depending on if your having issues with your WordPress install resulting in the error screen when you visit the site and your getting errors like:<\/p>\n<pre class=\"lang-php prettyprint prettyprinted\"><code><span class=\"pln\">connect<\/span><span class=\"pun\">()<\/span><span class=\"pln\"> to unix<\/span><span class=\"pun\">:<\/span><span class=\"str\">\/var\/<\/span><span class=\"pln\">run<\/span><span class=\"pun\">\/<\/span><span class=\"pln\">php5<\/span><span class=\"pun\">-<\/span><span class=\"pln\">fpm<\/span><span class=\"pun\">.<\/span><span class=\"pln\">sock failed<\/span><\/code><\/pre>\n<p>You may want to give this a try. What are are about to do is use sockets instead of TCP\/IP.<\/p>\n<p>Open PHP-FPM pool config file:<\/p>\n<pre class=\"no-highlight\">nano \/etc\/php5\/fpm\/pool.d\/www.conf<\/pre>\n<p>Uncomment\u00a0the following line by removing the semicolon:<\/p>\n<pre class=\"no-highlight\"><span style=\"color: #ff0000;\">;<\/span>listen.backlog = 65536<\/pre>\n<p>Restart the service:<\/p>\n<pre class=\"no-highlight\">service php5-fpm restart<\/pre>\n<h2>Using TCP\/IP for FPM<\/h2>\n<pre class=\"no-highlight\">nano \/etc\/php5\/fpm\/pool.d\/www.conf<\/pre>\n<p>Replace the following line:<\/p>\n<pre class=\"no-highlight\">listen = \/var\/run\/php5-fpm.sock<\/pre>\n<p>So it reads:<\/p>\n<pre class=\"no-highlight\">listen = 127.0.0.1:9000<\/pre>\n<p><a href=\"http:\/\/stackoverflow.com\/a\/23487409\/5318128\" target=\"_blank\">Uncomment line<\/a>:<\/p>\n<pre><code><span style=\"color: #ff0000;\">;<\/span>listen.mode = 0660<\/code><\/pre>\n<p>Find and <a href=\"http:\/\/serverfault.com\/a\/731619\/349284\">uncomment<\/a>:<\/p>\n<pre><code><span style=\"color: #ff0000;\">;<span style=\"color: #000000;\">pm.max_requests = 500<\/span><\/span><\/code><\/pre>\n<p>Save the changes and open the nginx virtual-host config file(s):<\/p>\n<pre class=\"code-pre \"><code>sudo nano \/etc\/nginx\/sites-enabled\/wordpress<\/code><\/pre>\n<p>Find the line:<\/p>\n<pre class=\"no-highlight\">fastcgi_pass unix:\/var\/run\/php5-fpm.sock;<\/pre>\n<p>Replace with:<\/p>\n<pre class=\"no-highlight\">fastcgi_pass 127.0.0.1:9000;<\/pre>\n<p>Save the changes and restart the services:<\/p>\n<pre class=\"no-highlight\">service php5-fpm restart &amp;&amp; service nginx restart<\/pre>\n<h2><\/h2>\n<h2>Adding Swap The Fast Way<\/h2>\n<p>If your on the smallest droplet size running WordPress, your likely running fairly low on RAM. To help with this we can create a swap file that should help keep things running fairly smoothly until your ready to upgrade to a larger droplet size.<\/p>\n<h3>Creating a 4GB Swap File<\/h3>\n<p>Create the file:<\/p>\n<pre class=\"code-pre \"><code>sudo fallocate -l 4G \/swapfile<\/code><\/pre>\n<p>Enable the swap file and set the correct permissions:<\/p>\n<pre class=\"code-pre \"><code>sudo chmod 600 \/swapfile<\/code><\/pre>\n<pre class=\"code-pre \"><code>sudo mkswap \/swapfile<\/code><\/pre>\n<pre class=\"code-pre \"><code>sudo swapon \/swapfile<\/code><\/pre>\n<h3>Make the the Swap File Permanent<\/h3>\n<p>We created the file, enabled it, and told the system to use it, however if the system is restarted it will not use the swap by default to make the changes permanent, we&#8217;ve got to edit the following file:<\/p>\n<pre class=\"code-pre \"><code>sudo nano \/etc\/fstab\r\n<\/code><\/pre>\n<p>Go to the bottom of the file and add the following line:<\/p>\n<pre class=\"code-pre \"><code>\/swapfile   none    swap    sw    0   0<\/code><\/pre>\n<h3>Tweak the Swappiness<\/h3>\n<p>Let&#8217;s tweak how much of the swap the system uses:<\/p>\n<pre class=\"code-pre \"><code>sudo nano \/etc\/sysctl.conf<\/code><\/pre>\n<p>Insert the following lines at the bottom of the file:<\/p>\n<pre class=\"code-pre \"><code>vm.swappiness=10\r\nvm.vfs_cache_pressure = 50\r\n<\/code><\/pre>\n<p>Save your changes. You&#8217;re all done!<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this guide, we will quickly provide instructions on\u00a0how to install a LEMP stack on an Ubuntu 14.04 server on Digital Ocean. The Ubuntu&#8230;<\/p>\n","protected":false},"author":1,"featured_media":97,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_yoast_wpseo_focuskw":"","_yoast_wpseo_title":"","_yoast_wpseo_metadesc":"","footnotes":""},"categories":[27,23],"tags":[26,25,28,24],"class_list":["post-81","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-how-to","category-wordpress","tag-digital-ocean","tag-nginx","tag-swap","tag-wordpress"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How To Install Linux, nginx, MySQL, PHP (LEMP) stack on Ubuntu 14.04 on DigitalOcean - Eckman Design<\/title>\n<meta name=\"description\" content=\"In this guide, we will quickly provide instructions on\u00a0how to install a LEMP stack on an Ubuntu 14.04 server on Digital Ocean. The Ubuntu operating system\" \/>\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.eckmandesign.com\/blog\/how-to-install-linux-nginx-mysql-php-lemp-stack-on-ubuntu-14-04-on-digitalocean\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How To Install Linux, nginx, MySQL, PHP (LEMP) stack on Ubuntu 14.04 on DigitalOcean - Eckman Design\" \/>\n<meta property=\"og:description\" content=\"In this guide, we will quickly provide instructions on\u00a0how to install a LEMP stack on an Ubuntu 14.04 server on Digital Ocean. The Ubuntu operating system\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.eckmandesign.com\/blog\/how-to-install-linux-nginx-mysql-php-lemp-stack-on-ubuntu-14-04-on-digitalocean\/\" \/>\n<meta property=\"og:site_name\" content=\"Eckman Design\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/Eckman-Design-913317988788314\/\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/chris.eckman1\" \/>\n<meta property=\"article:published_time\" content=\"2016-04-03T22:57:48+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2016-12-05T18:39:37+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.eckmandesign.com\/blog\/wp-content\/uploads\/2016\/04\/Wordpress-DigitalOcean-Nginx.png\" \/>\n\t<meta property=\"og:image:width\" content=\"672\" \/>\n\t<meta property=\"og:image:height\" content=\"372\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Chris Eckman\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@ChrisEckmanLA\" \/>\n<meta name=\"twitter:site\" content=\"@eckmandesign\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Chris Eckman\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.eckmandesign.com\\\/blog\\\/how-to-install-linux-nginx-mysql-php-lemp-stack-on-ubuntu-14-04-on-digitalocean\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.eckmandesign.com\\\/blog\\\/how-to-install-linux-nginx-mysql-php-lemp-stack-on-ubuntu-14-04-on-digitalocean\\\/\"},\"author\":{\"name\":\"Chris Eckman\",\"@id\":\"https:\\\/\\\/www.eckmandesign.com\\\/blog\\\/#\\\/schema\\\/person\\\/db60b64245e90e7b7b8f5b979a09d122\"},\"headline\":\"How To Install Linux, nginx, MySQL, PHP (LEMP) stack on Ubuntu 14.04 on DigitalOcean\",\"datePublished\":\"2016-04-03T22:57:48+00:00\",\"dateModified\":\"2016-12-05T18:39:37+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.eckmandesign.com\\\/blog\\\/how-to-install-linux-nginx-mysql-php-lemp-stack-on-ubuntu-14-04-on-digitalocean\\\/\"},\"wordCount\":976,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.eckmandesign.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.eckmandesign.com\\\/blog\\\/how-to-install-linux-nginx-mysql-php-lemp-stack-on-ubuntu-14-04-on-digitalocean\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.eckmandesign.com\\\/blog\\\/wp-content\\\/uploads\\\/2016\\\/04\\\/Wordpress-DigitalOcean-Nginx.png\",\"keywords\":[\"Digital Ocean\",\"nginx\",\"swap\",\"WordPress\"],\"articleSection\":[\"How To\",\"WordPress\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.eckmandesign.com\\\/blog\\\/how-to-install-linux-nginx-mysql-php-lemp-stack-on-ubuntu-14-04-on-digitalocean\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.eckmandesign.com\\\/blog\\\/how-to-install-linux-nginx-mysql-php-lemp-stack-on-ubuntu-14-04-on-digitalocean\\\/\",\"url\":\"https:\\\/\\\/www.eckmandesign.com\\\/blog\\\/how-to-install-linux-nginx-mysql-php-lemp-stack-on-ubuntu-14-04-on-digitalocean\\\/\",\"name\":\"How To Install Linux, nginx, MySQL, PHP (LEMP) stack on Ubuntu 14.04 on DigitalOcean - Eckman Design\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.eckmandesign.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.eckmandesign.com\\\/blog\\\/how-to-install-linux-nginx-mysql-php-lemp-stack-on-ubuntu-14-04-on-digitalocean\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.eckmandesign.com\\\/blog\\\/how-to-install-linux-nginx-mysql-php-lemp-stack-on-ubuntu-14-04-on-digitalocean\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.eckmandesign.com\\\/blog\\\/wp-content\\\/uploads\\\/2016\\\/04\\\/Wordpress-DigitalOcean-Nginx.png\",\"datePublished\":\"2016-04-03T22:57:48+00:00\",\"dateModified\":\"2016-12-05T18:39:37+00:00\",\"description\":\"In this guide, we will quickly provide instructions on\u00a0how to install a LEMP stack on an Ubuntu 14.04 server on Digital Ocean. The Ubuntu operating system\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.eckmandesign.com\\\/blog\\\/how-to-install-linux-nginx-mysql-php-lemp-stack-on-ubuntu-14-04-on-digitalocean\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.eckmandesign.com\\\/blog\\\/how-to-install-linux-nginx-mysql-php-lemp-stack-on-ubuntu-14-04-on-digitalocean\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.eckmandesign.com\\\/blog\\\/how-to-install-linux-nginx-mysql-php-lemp-stack-on-ubuntu-14-04-on-digitalocean\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.eckmandesign.com\\\/blog\\\/wp-content\\\/uploads\\\/2016\\\/04\\\/Wordpress-DigitalOcean-Nginx.png\",\"contentUrl\":\"https:\\\/\\\/www.eckmandesign.com\\\/blog\\\/wp-content\\\/uploads\\\/2016\\\/04\\\/Wordpress-DigitalOcean-Nginx.png\",\"width\":672,\"height\":372,\"caption\":\"Wordpress DigitalOcean Nginx\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.eckmandesign.com\\\/blog\\\/how-to-install-linux-nginx-mysql-php-lemp-stack-on-ubuntu-14-04-on-digitalocean\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.eckmandesign.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How To Install Linux, nginx, MySQL, PHP (LEMP) stack on Ubuntu 14.04 on DigitalOcean\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.eckmandesign.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.eckmandesign.com\\\/blog\\\/\",\"name\":\"Eckman Design\",\"description\":\"AI Automation Software &amp; Workflow Systems\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.eckmandesign.com\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.eckmandesign.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.eckmandesign.com\\\/blog\\\/#organization\",\"name\":\"Eckman Design, LLC.\",\"url\":\"https:\\\/\\\/www.eckmandesign.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.eckmandesign.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.eckmandesign.com\\\/blog\\\/wp-content\\\/uploads\\\/2016\\\/04\\\/eckman_design_twitter_card.png\",\"contentUrl\":\"https:\\\/\\\/www.eckmandesign.com\\\/blog\\\/wp-content\\\/uploads\\\/2016\\\/04\\\/eckman_design_twitter_card.png\",\"width\":1200,\"height\":630,\"caption\":\"Eckman Design, LLC.\"},\"image\":{\"@id\":\"https:\\\/\\\/www.eckmandesign.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/Eckman-Design-913317988788314\\\/\",\"https:\\\/\\\/x.com\\\/eckmandesign\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.eckmandesign.com\\\/blog\\\/#\\\/schema\\\/person\\\/db60b64245e90e7b7b8f5b979a09d122\",\"name\":\"Chris Eckman\",\"sameAs\":[\"https:\\\/\\\/www.eckmandesign.com\",\"https:\\\/\\\/www.facebook.com\\\/chris.eckman1\",\"https:\\\/\\\/x.com\\\/ChrisEckmanLA\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How To Install Linux, nginx, MySQL, PHP (LEMP) stack on Ubuntu 14.04 on DigitalOcean - Eckman Design","description":"In this guide, we will quickly provide instructions on\u00a0how to install a LEMP stack on an Ubuntu 14.04 server on Digital Ocean. The Ubuntu operating system","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.eckmandesign.com\/blog\/how-to-install-linux-nginx-mysql-php-lemp-stack-on-ubuntu-14-04-on-digitalocean\/","og_locale":"en_US","og_type":"article","og_title":"How To Install Linux, nginx, MySQL, PHP (LEMP) stack on Ubuntu 14.04 on DigitalOcean - Eckman Design","og_description":"In this guide, we will quickly provide instructions on\u00a0how to install a LEMP stack on an Ubuntu 14.04 server on Digital Ocean. The Ubuntu operating system","og_url":"https:\/\/www.eckmandesign.com\/blog\/how-to-install-linux-nginx-mysql-php-lemp-stack-on-ubuntu-14-04-on-digitalocean\/","og_site_name":"Eckman Design","article_publisher":"https:\/\/www.facebook.com\/Eckman-Design-913317988788314\/","article_author":"https:\/\/www.facebook.com\/chris.eckman1","article_published_time":"2016-04-03T22:57:48+00:00","article_modified_time":"2016-12-05T18:39:37+00:00","og_image":[{"width":672,"height":372,"url":"https:\/\/www.eckmandesign.com\/blog\/wp-content\/uploads\/2016\/04\/Wordpress-DigitalOcean-Nginx.png","type":"image\/png"}],"author":"Chris Eckman","twitter_card":"summary_large_image","twitter_creator":"@ChrisEckmanLA","twitter_site":"@eckmandesign","twitter_misc":{"Written by":"Chris Eckman","Est. reading time":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.eckmandesign.com\/blog\/how-to-install-linux-nginx-mysql-php-lemp-stack-on-ubuntu-14-04-on-digitalocean\/#article","isPartOf":{"@id":"https:\/\/www.eckmandesign.com\/blog\/how-to-install-linux-nginx-mysql-php-lemp-stack-on-ubuntu-14-04-on-digitalocean\/"},"author":{"name":"Chris Eckman","@id":"https:\/\/www.eckmandesign.com\/blog\/#\/schema\/person\/db60b64245e90e7b7b8f5b979a09d122"},"headline":"How To Install Linux, nginx, MySQL, PHP (LEMP) stack on Ubuntu 14.04 on DigitalOcean","datePublished":"2016-04-03T22:57:48+00:00","dateModified":"2016-12-05T18:39:37+00:00","mainEntityOfPage":{"@id":"https:\/\/www.eckmandesign.com\/blog\/how-to-install-linux-nginx-mysql-php-lemp-stack-on-ubuntu-14-04-on-digitalocean\/"},"wordCount":976,"commentCount":0,"publisher":{"@id":"https:\/\/www.eckmandesign.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.eckmandesign.com\/blog\/how-to-install-linux-nginx-mysql-php-lemp-stack-on-ubuntu-14-04-on-digitalocean\/#primaryimage"},"thumbnailUrl":"https:\/\/www.eckmandesign.com\/blog\/wp-content\/uploads\/2016\/04\/Wordpress-DigitalOcean-Nginx.png","keywords":["Digital Ocean","nginx","swap","WordPress"],"articleSection":["How To","WordPress"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.eckmandesign.com\/blog\/how-to-install-linux-nginx-mysql-php-lemp-stack-on-ubuntu-14-04-on-digitalocean\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.eckmandesign.com\/blog\/how-to-install-linux-nginx-mysql-php-lemp-stack-on-ubuntu-14-04-on-digitalocean\/","url":"https:\/\/www.eckmandesign.com\/blog\/how-to-install-linux-nginx-mysql-php-lemp-stack-on-ubuntu-14-04-on-digitalocean\/","name":"How To Install Linux, nginx, MySQL, PHP (LEMP) stack on Ubuntu 14.04 on DigitalOcean - Eckman Design","isPartOf":{"@id":"https:\/\/www.eckmandesign.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.eckmandesign.com\/blog\/how-to-install-linux-nginx-mysql-php-lemp-stack-on-ubuntu-14-04-on-digitalocean\/#primaryimage"},"image":{"@id":"https:\/\/www.eckmandesign.com\/blog\/how-to-install-linux-nginx-mysql-php-lemp-stack-on-ubuntu-14-04-on-digitalocean\/#primaryimage"},"thumbnailUrl":"https:\/\/www.eckmandesign.com\/blog\/wp-content\/uploads\/2016\/04\/Wordpress-DigitalOcean-Nginx.png","datePublished":"2016-04-03T22:57:48+00:00","dateModified":"2016-12-05T18:39:37+00:00","description":"In this guide, we will quickly provide instructions on\u00a0how to install a LEMP stack on an Ubuntu 14.04 server on Digital Ocean. The Ubuntu operating system","breadcrumb":{"@id":"https:\/\/www.eckmandesign.com\/blog\/how-to-install-linux-nginx-mysql-php-lemp-stack-on-ubuntu-14-04-on-digitalocean\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.eckmandesign.com\/blog\/how-to-install-linux-nginx-mysql-php-lemp-stack-on-ubuntu-14-04-on-digitalocean\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.eckmandesign.com\/blog\/how-to-install-linux-nginx-mysql-php-lemp-stack-on-ubuntu-14-04-on-digitalocean\/#primaryimage","url":"https:\/\/www.eckmandesign.com\/blog\/wp-content\/uploads\/2016\/04\/Wordpress-DigitalOcean-Nginx.png","contentUrl":"https:\/\/www.eckmandesign.com\/blog\/wp-content\/uploads\/2016\/04\/Wordpress-DigitalOcean-Nginx.png","width":672,"height":372,"caption":"Wordpress DigitalOcean Nginx"},{"@type":"BreadcrumbList","@id":"https:\/\/www.eckmandesign.com\/blog\/how-to-install-linux-nginx-mysql-php-lemp-stack-on-ubuntu-14-04-on-digitalocean\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.eckmandesign.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How To Install Linux, nginx, MySQL, PHP (LEMP) stack on Ubuntu 14.04 on DigitalOcean"}]},{"@type":"WebSite","@id":"https:\/\/www.eckmandesign.com\/blog\/#website","url":"https:\/\/www.eckmandesign.com\/blog\/","name":"Eckman Design","description":"AI Automation Software &amp; Workflow Systems","publisher":{"@id":"https:\/\/www.eckmandesign.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.eckmandesign.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.eckmandesign.com\/blog\/#organization","name":"Eckman Design, LLC.","url":"https:\/\/www.eckmandesign.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.eckmandesign.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.eckmandesign.com\/blog\/wp-content\/uploads\/2016\/04\/eckman_design_twitter_card.png","contentUrl":"https:\/\/www.eckmandesign.com\/blog\/wp-content\/uploads\/2016\/04\/eckman_design_twitter_card.png","width":1200,"height":630,"caption":"Eckman Design, LLC."},"image":{"@id":"https:\/\/www.eckmandesign.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/Eckman-Design-913317988788314\/","https:\/\/x.com\/eckmandesign"]},{"@type":"Person","@id":"https:\/\/www.eckmandesign.com\/blog\/#\/schema\/person\/db60b64245e90e7b7b8f5b979a09d122","name":"Chris Eckman","sameAs":["https:\/\/www.eckmandesign.com","https:\/\/www.facebook.com\/chris.eckman1","https:\/\/x.com\/ChrisEckmanLA"]}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/www.eckmandesign.com\/blog\/wp-json\/wp\/v2\/posts\/81","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.eckmandesign.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.eckmandesign.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.eckmandesign.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.eckmandesign.com\/blog\/wp-json\/wp\/v2\/comments?post=81"}],"version-history":[{"count":0,"href":"https:\/\/www.eckmandesign.com\/blog\/wp-json\/wp\/v2\/posts\/81\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.eckmandesign.com\/blog\/wp-json\/wp\/v2\/media\/97"}],"wp:attachment":[{"href":"https:\/\/www.eckmandesign.com\/blog\/wp-json\/wp\/v2\/media?parent=81"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.eckmandesign.com\/blog\/wp-json\/wp\/v2\/categories?post=81"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.eckmandesign.com\/blog\/wp-json\/wp\/v2\/tags?post=81"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}