{"id":2534,"date":"2016-08-18T16:03:04","date_gmt":"2016-08-18T20:03:04","guid":{"rendered":"https:\/\/www.globo.tech\/learning-center\/?p=2534"},"modified":"2017-10-10T12:40:26","modified_gmt":"2017-10-10T16:40:26","slug":"install-wordpress-ubuntu-14","status":"publish","type":"post","link":"https:\/\/www.globo.tech\/learning-center\/install-wordpress-ubuntu-14\/","title":{"rendered":"How to Install WordPress on Ubuntu 14"},"content":{"rendered":"<p>CMS powerhouse WordPress makes up over 25% of the internet, and that percentage only continues to grow. The millions of websites that use WordPress love it for its flexibility, ease of use, consistent performance, and continual innovative growth. Once you have it set up, you can design and manage your website or blog right from the web. In this Knowledge Base, you will learn how to install WordPress on Ubuntu 14. <\/p>\n<h2>Getting Started<\/h2>\n<p>To complete this guide, you will need the following:<br \/>\n\u2022 1 Node (<a href=\"https:\/\/www.globo.tech\/cloud-server-pricing\" target=\"_blank\">Cloud Server<\/a> or <a href=\"http:\/\/www.globo.tech\/dedicated-server-hosting\" target=\"_blank\">Dedicated Server<\/a>) with Ubuntu 14 and a LAMP setup previously installed.<\/p>\n<p><code class=\"gris\">If you don't want to go through the whole installation of WordPress on your CentOS 7 server, you can always try our <a href=\"https:\/\/www.globo.tech\/cloud-server-pricing\" target=\"_blank\">One-Click Apps<\/a> and get a new WordPress in seconds. <\/code><\/p>\n<h2>Tutorial<\/h2>\n<p><strong>1. Create database and user account.<\/strong><br \/>\nWordpress relies on MySQL to manage and store information. We need to create the database. In this case, we will use &#8220;wordpress&#8221; for the database name. <\/p>\n<p>Log into your MySQL with your root access:<\/p>\n<p><code>mysql -u root -p<\/code><\/p>\n<p>To function, WordPress needs a database that it can control. Now we&#8217;ll create the create the database for WordPress:<\/p>\n<p><code>mysql> CREATE DATABASE wordpress;<\/code><\/p>\n<p>You need to create an account with a username and password that will exclusively operate the database you&#8217;ve just created. We will use user &#8220;wpuser&#8221; and password &#8220;wppassword&#8221; in this example. Create the account:<\/p>\n<p><code>mysql> CREATE USER wpuser@localhost IDENTIFIED BY 'wppassword';<\/code><\/p>\n<p>At this point, the database and the user accounts you&#8217;ve created aren&#8217;t connected, so the next step is to give the privileges to the user to access the database created:<\/p>\n<p><code>mysql> GRANT ALL PRIVILEGES ON wordpress.* TO wpuser@localhost;<\/code><\/p>\n<p>To ensure that MySQL knows about the changes just made, we need to confirm and flush all privileges:<\/p>\n<p><code>mysql> FLUSH PRIVILEGES;<\/code><\/p>\n<p>You can now exit MySQL:<\/p>\n<p><code>mysql> exit<\/code><\/p>\n<p><strong>2. Download and unzip the latest version of WordPress.<\/strong><br \/>\nIt&#8217;s important to use the latest version of WordPress, which updates fairly regularly, for security reasons. Download the latest version of WordPress in the \/root directory:<\/p>\n<p><code>cd \/root<br \/>\nwget http:\/\/wordpress.org\/latest.tar.gz<\/code><\/p>\n<p>When the download is complete, we need to unzip to extract the files we need. This will create a directory WordPress in your \/root:<\/p>\n<p><code>tar -zxvf latest.tar.gz<\/code><\/p>\n<p>Some PHP modules are needed to run WordPress on your server:<\/p>\n<p><code>apt-get install php5-gd libssh2-php -y<\/code><\/p>\n<p><strong>3.Copy the content of the WordPress directory in the Document root.<\/strong><br \/>\nWordpress uses index.php, but your server will automatically use index.html instead if it&#8217;s there, so we need to remove the index.html file in the Document root directory:<\/p>\n<p><code>rm -rf \/var\/www\/html\/index.html<\/code><\/p>\n<p>For WordPress to work, we now must copy the content of the WordPress directory in the Document root:<\/p>\n<p><code>cd \/root\/wordpress<br \/>\ncp * -R \/var\/www\/html\/<\/code><\/p>\n<p>Apache will sometimes need to interact with the content, so we have to give the ownership to Apache to the Document root directory:<\/p>\n<p><code>cd \/var\/www\/html\/<br \/>\nchown -R www-data. *<\/code><\/p>\n<p>So that we will be able to upload files and images to the website, we next create the &#8220;uploads&#8221; directory to your WordPress and give this directory the ownership:<\/p>\n<p><code>mkdir \/var\/www\/html\/wp-content\/uploads<br \/>\nchown -R www-data. \/var\/www\/html\/wp-content\/uploads\/<\/code><\/p>\n<p><strong>4. Configure your WordPress<\/strong><br \/>\nGo in your WordPress installation to the Document root directory:<\/p>\n<p><code>cd \/var\/www\/html\/<\/code><\/p>\n<p>For WordPress to function properly, we need to configure it. A sample config file is included with our WordPress directory. Copy the sample config file to wp-config.php:<\/p>\n<p><code>cp wp-config-sample.php wp-config.php<\/code><\/p>\n<p>The sample wp-config.php file won&#8217;t work correctly until we edit it and fill up the information with our database credentials:<\/p>\n<p><code>nano wp-config.php<\/code><\/p>\n<p><code class=\"gris\">\/\/ ** MySQL settings - You can get this info from your web host ** \/\/<br \/>\n\/** The name of the database for WordPress *\/<br \/>\ndefine('DB_NAME', 'wordpress');<br \/>\n\/** MySQL database username *\/<br \/>\ndefine('DB_USER', 'wpuser');<br \/>\n\/** MySQL database password *\/<br \/>\ndefine('DB_PASSWORD', 'wppassword');<\/code><\/p>\n<p>Save and exit.<\/p>\n<p>We&#8217;ve already given ownership to Apache, but in order for Apache to actually be able to do rewrites for your WordPress, we need to create the default .htaccess file in the Document root directory:<\/p>\n<p><code>cd \/var\/www\/html\/<br \/>\nnano .htaccess<\/code><\/p>\n<p><code># BEGIN WordPress<br \/>\n<IfModule mod_rewrite.c><br \/>\nRewriteEngine On<br \/>\nRewriteBase \/<br \/>\nRewriteRule ^index\\.php$ - [L]<br \/>\nRewriteCond %{REQUEST_FILENAME} !-f<br \/>\nRewriteCond %{REQUEST_FILENAME} !-d<br \/>\nRewriteRule . \/index.php [L]<br \/>\n<\/IfModule><br \/>\n# END WordPress<\/code><\/p>\n<p>Save and exit.<\/p>\n<p><strong>5. Complete WordPress installation directly on the web.<\/strong><br \/>\nhttp:\/\/your_main_ip<br \/>\n\u2022\tYou will have to choose the language you want for your WordPress.<br \/>\n\u2022\tYou need to add your site title.<br \/>\n\u2022\tYou need to choose the username you want for administrator. It&#8217;s best to avoid common or generic usernames like &#8220;admin&#8221; for security reasons.<br \/>\n\u2022\tWordpress will automatically create a very strong password, but you can change this to another strong password if you wish.<br \/>\n\u2022\tYou will need to add your email address.<\/p>\n<p>You can now access your WordPress with the username and password set.<br \/>\nhttp:\/\/your_main_ip\/wp-admin\/<\/p>\n<h2>Conclusion<\/h2>\n<p>Your WordPress should now be installed and you&#8217;re ready to create your website. This basic setup should serve most users well, but some tweaks may be necessary depending on the way you plan to use WordPress. Explore the interface of your new CMS, and you&#8217;ll quickly see why so much of the web relies on it. Check out our list of some of the most popular WordPress plugins that will really help take your website to the next level, and take some time to learn about how to protect your WordPress site from attack.<\/p>\n<p>If you liked this KB article, please share it with your friends. <\/p>\n<!-- AddThis Advanced Settings generic via filter on the_content --><!-- AddThis Share Buttons generic via filter on the_content -->","protected":false},"excerpt":{"rendered":"<p>CMS powerhouse WordPress makes up over 25% of the internet, and that percentage only continues to grow. The millions of websites that use WordPress love it for its flexibility, ease of use, consistent performance, and continual innovative growth. Once you have it set up, you can design and manage your website or blog right from<!-- AddThis Advanced Settings generic via filter on get_the_excerpt --><!-- AddThis Share Buttons generic via filter on get_the_excerpt --><\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[70],"tags":[],"class_list":["post-2534","post","type-post","status-publish","format-standard","hentry","category-web-hosting","operating_system-ubuntu-14-04","applications-wordpress2"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.0 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to Install Wordpress on Ubuntu 14 - Globo.Tech<\/title>\n<meta name=\"description\" content=\"This tutorial will walk you through the installation of the content management system Wordpress on your Ubuntu 14.04 LTS server. Read now!\" \/>\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.globo.tech\/learning-center\/install-wordpress-ubuntu-14\/\" \/>\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 on Ubuntu 14 - Globo.Tech\" \/>\n<meta property=\"og:description\" content=\"This tutorial will walk you through the installation of the content management system Wordpress on your Ubuntu 14.04 LTS server. Read now!\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.globo.tech\/learning-center\/install-wordpress-ubuntu-14\/\" \/>\n<meta property=\"og:site_name\" content=\"Globo.Tech\" \/>\n<meta property=\"article:published_time\" content=\"2016-08-18T20:03:04+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2017-10-10T16:40:26+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.globo.tech\/learning-center\/wp-content\/uploads\/2016\/09\/GloboTech-Logo.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1920\" \/>\n\t<meta property=\"og:image:height\" content=\"963\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"GloboTech Communications\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"GloboTech Communications\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.globo.tech\/learning-center\/install-wordpress-ubuntu-14\/\",\"url\":\"https:\/\/www.globo.tech\/learning-center\/install-wordpress-ubuntu-14\/\",\"name\":\"How to Install Wordpress on Ubuntu 14 - Globo.Tech\",\"isPartOf\":{\"@id\":\"https:\/\/www.globo.tech\/learning-center\/#website\"},\"datePublished\":\"2016-08-18T20:03:04+00:00\",\"dateModified\":\"2017-10-10T16:40:26+00:00\",\"author\":{\"@id\":\"https:\/\/www.globo.tech\/learning-center\/#\/schema\/person\/e17784b37f4a4f49b7bc611847912e87\"},\"description\":\"This tutorial will walk you through the installation of the content management system Wordpress on your Ubuntu 14.04 LTS server. Read now!\",\"breadcrumb\":{\"@id\":\"https:\/\/www.globo.tech\/learning-center\/install-wordpress-ubuntu-14\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.globo.tech\/learning-center\/install-wordpress-ubuntu-14\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.globo.tech\/learning-center\/install-wordpress-ubuntu-14\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.globo.tech\/learning-center\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Install WordPress on Ubuntu 14\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.globo.tech\/learning-center\/#website\",\"url\":\"https:\/\/www.globo.tech\/learning-center\/\",\"name\":\"Globo.Tech\",\"description\":\"Welcome to the Official Globo.Tech Learning Center\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.globo.tech\/learning-center\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.globo.tech\/learning-center\/#\/schema\/person\/e17784b37f4a4f49b7bc611847912e87\",\"name\":\"GloboTech Communications\",\"sameAs\":[\"http:\/\/www.gtcomm.net\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Install Wordpress on Ubuntu 14 - Globo.Tech","description":"This tutorial will walk you through the installation of the content management system Wordpress on your Ubuntu 14.04 LTS server. Read now!","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.globo.tech\/learning-center\/install-wordpress-ubuntu-14\/","og_locale":"en_US","og_type":"article","og_title":"How to Install Wordpress on Ubuntu 14 - Globo.Tech","og_description":"This tutorial will walk you through the installation of the content management system Wordpress on your Ubuntu 14.04 LTS server. Read now!","og_url":"https:\/\/www.globo.tech\/learning-center\/install-wordpress-ubuntu-14\/","og_site_name":"Globo.Tech","article_published_time":"2016-08-18T20:03:04+00:00","article_modified_time":"2017-10-10T16:40:26+00:00","og_image":[{"width":1920,"height":963,"url":"https:\/\/www.globo.tech\/learning-center\/wp-content\/uploads\/2016\/09\/GloboTech-Logo.png","type":"image\/png"}],"author":"GloboTech Communications","twitter_misc":{"Written by":"GloboTech Communications","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.globo.tech\/learning-center\/install-wordpress-ubuntu-14\/","url":"https:\/\/www.globo.tech\/learning-center\/install-wordpress-ubuntu-14\/","name":"How to Install Wordpress on Ubuntu 14 - Globo.Tech","isPartOf":{"@id":"https:\/\/www.globo.tech\/learning-center\/#website"},"datePublished":"2016-08-18T20:03:04+00:00","dateModified":"2017-10-10T16:40:26+00:00","author":{"@id":"https:\/\/www.globo.tech\/learning-center\/#\/schema\/person\/e17784b37f4a4f49b7bc611847912e87"},"description":"This tutorial will walk you through the installation of the content management system Wordpress on your Ubuntu 14.04 LTS server. Read now!","breadcrumb":{"@id":"https:\/\/www.globo.tech\/learning-center\/install-wordpress-ubuntu-14\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.globo.tech\/learning-center\/install-wordpress-ubuntu-14\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.globo.tech\/learning-center\/install-wordpress-ubuntu-14\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.globo.tech\/learning-center\/"},{"@type":"ListItem","position":2,"name":"How to Install WordPress on Ubuntu 14"}]},{"@type":"WebSite","@id":"https:\/\/www.globo.tech\/learning-center\/#website","url":"https:\/\/www.globo.tech\/learning-center\/","name":"Globo.Tech","description":"Welcome to the Official Globo.Tech Learning Center","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.globo.tech\/learning-center\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.globo.tech\/learning-center\/#\/schema\/person\/e17784b37f4a4f49b7bc611847912e87","name":"GloboTech Communications","sameAs":["http:\/\/www.gtcomm.net"]}]}},"_links":{"self":[{"href":"https:\/\/www.globo.tech\/learning-center\/wp-json\/wp\/v2\/posts\/2534","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.globo.tech\/learning-center\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.globo.tech\/learning-center\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.globo.tech\/learning-center\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.globo.tech\/learning-center\/wp-json\/wp\/v2\/comments?post=2534"}],"version-history":[{"count":4,"href":"https:\/\/www.globo.tech\/learning-center\/wp-json\/wp\/v2\/posts\/2534\/revisions"}],"predecessor-version":[{"id":3001,"href":"https:\/\/www.globo.tech\/learning-center\/wp-json\/wp\/v2\/posts\/2534\/revisions\/3001"}],"wp:attachment":[{"href":"https:\/\/www.globo.tech\/learning-center\/wp-json\/wp\/v2\/media?parent=2534"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.globo.tech\/learning-center\/wp-json\/wp\/v2\/categories?post=2534"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.globo.tech\/learning-center\/wp-json\/wp\/v2\/tags?post=2534"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}