{"id":57,"date":"2017-07-02T11:05:22","date_gmt":"2017-07-02T11:05:22","guid":{"rendered":"http:\/\/jaipurhosting.com\/blog\/?p=57"},"modified":"2024-10-30T18:02:02","modified_gmt":"2024-10-30T12:32:02","slug":"install-and-configure-wordpress-on-cent-os-6","status":"publish","type":"post","link":"https:\/\/www.jaipurhosting.com\/blog\/install-and-configure-wordpress-on-cent-os-6\/","title":{"rendered":"Install and configure wordpress on Cent OS 6"},"content":{"rendered":"<p>&nbsp;<\/p>\n<p><strong>About WordPress<\/strong><\/p>\n<p>WordPress is an online, open source website creation tool written in PHP. But in non-geek speak, it&#8217;s probably the easiest and most powerful blogging and website content management system (or CMS) in existence today.<\/p>\n<p><strong>Set up<\/strong><\/p>\n<p>* Before working with wordpress, you need to have LAMP installed on your server.<\/p>\n<p>* Once you have the user and required software, you can start installing wordpress.<\/p>\n<p>Steps for installing and configuring wordpress in cent OS 6 as below<\/p>\n<p><strong>Step 1 :&nbsp;<\/strong><\/p>\n<p><strong>Download wordpress<\/strong><\/p>\n<p>We can download WordPress using the below command<\/p>\n<pre class=\"theme:dark-terminal line-height:40 lang:default decode:true \">wget http:\/\/wordpress.org\/latest.tar.gz\n<\/pre>\n<p>This command will download the zipped wordpress package straight to your user&#8217;s home directory.<\/p>\n<p><strong>Unzip wordpress package<\/strong><\/p>\n<p>We can unzip it to the next line<\/p>\n<pre class=\"theme:dark-terminal line-height:40 lang:default decode:true\">tar -xzvf latest.tar.gz<\/pre>\n<p>&nbsp;<\/p>\n<p><strong>Step 2 :&nbsp;<\/strong><\/p>\n<p><strong>Creating wordPress Database and User<\/strong><\/p>\n<p>After we unzip the wordpress files, they will be in a directory called wordpress in the home directory.<\/p>\n<p>Now we need to switch gears for a moment and create a new MySQL directory for wordpress.<\/p>\n<p>&nbsp;<\/p>\n<p>Log into the MySQL Shell:<\/p>\n<pre class=\"theme:dark-terminal line-height:40 lang:default decode:true\">mysql -u root -p<\/pre>\n<p>* Login using your MySQL root password<\/p>\n<p>Then we need to create<\/p>\n<p>* &nbsp;Wordpress database<br \/>\n* &nbsp;User in that database and<br \/>\n* &nbsp;Give that user a new password.<\/p>\n<p><strong>Note : All MySQL commands must end with semi-colon<\/strong><\/p>\n<pre class=\"theme:dark-terminal line-height:40 lang:default decode:true\">CREATE DATABASE wordpress;\nQuery OK, 1 row affected (0.00 sec)<\/pre>\n<p>* Then we need to create the new user.<br \/>\n* We can replace the database, name and password with our preference<\/p>\n<p>&nbsp;<\/p>\n<pre class=\"theme:dark-terminal line-height:40 lang:default decode:true\">CREATE USER wordpressuser@localhost;\nQuery OK, 0 rows affected (0.00 sec)<\/pre>\n<p>&nbsp;<\/p>\n<p>Set the password for the new user:<\/p>\n<pre class=\"theme:dark-terminal line-height:40 lang:default decode:true\">SET PASSWORD FOR wordpressuser@localhost= PASSWORD(\"password\");\nQuery OK, 0 rows affected (0.00 sec)<\/pre>\n<p>Upon the process we have to grant all the privileges on wordpress<\/p>\n<pre class=\"theme:dark-terminal line-height:40 lang:default decode:true\">GRANT ALL PRIVILEGES ON wordpress.* TO wordpressuser@localhost IDENTIFIED BY 'password';\nQuery OK, 0 rows affected (0.00 sec)<\/pre>\n<p>&nbsp;<\/p>\n<p><strong>Then refresh MySQL:<\/strong><\/p>\n<pre class=\"theme:dark-terminal line-height:40 lang:default decode:true\">FLUSH PRIVILEGES;\nQuery OK, 0 rows affected (0.00 sec)<\/pre>\n<p>Exit out of the MySQL shell:<\/p>\n<pre class=\"theme:dark-terminal line-height:40 lang:default decode:true\">exit<\/pre>\n<p>&nbsp;<\/p>\n<p><strong>Step 3 :&nbsp;<\/strong><\/p>\n<p><strong>WordPress configuration setup<\/strong><\/p>\n<p>The first step to is to copy the sample wordpress configuration file located in the wordpress directory into a new file which we will edit, creating a new usable wordpress config<\/p>\n<pre class=\"theme:dark-terminal line-height:40 lang:default decode:true\">cp ~\/wordpress\/wp-config-sample.php ~\/wordpress\/wp-config.php<\/pre>\n<p>Then open the wordpress config:<\/p>\n<pre class=\"theme:dark-terminal line-height:40 lang:default decode:true\">vi ~\/wordpress\/wp-config.php<\/pre>\n<p>Find the section that contains the field below and substitute in the correct name for your database, username, and password:<\/p>\n<pre class=\"theme:dark-terminal line-height:40 lang:default decode:true\">\/\/ ** MySQL settings - You can get this info from your web host ** \/\/\n\/** The name of the database for WordPress *\/\ndefine('DB_NAME', 'wordpress');\n\n\/** MySQL database username *\/\ndefine('DB_USER', 'wordpressuser');\n\n\/** MySQL database password *\/\ndefine('DB_PASSWORD', 'password');<\/pre>\n<p>Save and Exit.<\/p>\n<p><strong>Step 4 :&nbsp;<\/strong><\/p>\n<p><strong>Copy the files<\/strong><\/p>\n<p>The final move that remains is to transfer the unzipped WordPress files to the website&#8217;s root directory.<\/p>\n<pre class=\"theme:dark-terminal line-height:40 lang:default decode:true\">sudo cp -r ~\/wordpress\/* \/var\/www\/html<\/pre>\n<p>From here, WordPress has its own easy to follow installation form online.<\/p>\n<p>However, the form does require a specific php module to run. If it is not yet installed on your server, download php-gd:<\/p>\n<pre class=\"theme:dark-terminal line-height:40 lang:default decode:true\">sudo yum install php-gd<\/pre>\n<p>Last of all restart Apache:<\/p>\n<pre class=\"theme:dark-terminal line-height:40 lang:default decode:true \">sudo service httpd restart<\/pre>\n<p><strong>Step 5 :&nbsp;<\/strong><\/p>\n<p><strong>Access the WordPress Installation<\/strong><\/p>\n<p>Upon completion of above process we can access the wordpress admin page as below<\/p>\n<p><strong>domainname.com\/wpadmin&nbsp;<\/strong><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-59 aligncenter\" src=\"http:\/\/jaipurhosting.com\/blog\/wp-content\/uploads\/2017\/07\/1-1.png\" alt=\"\" width=\"446\" height=\"731\" srcset=\"https:\/\/www.jaipurhosting.com\/blog\/wp-content\/uploads\/2017\/07\/1-1.png 446w, https:\/\/www.jaipurhosting.com\/blog\/wp-content\/uploads\/2017\/07\/1-1-183x300.png 183w\" sizes=\"auto, (max-width: 446px) 100vw, 446px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>Click <strong>continue <\/strong>and proceed further for the installation setup<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>&nbsp; About WordPress WordPress is an online, open source website creation tool written in PHP. But in non-geek speak, it&#8217;s probably the easiest and most powerful blogging and website content management system (or CMS) in existence today. Set up * Before working with wordpress, you need to have LAMP installed on your server. * Once [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":1014,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6,5],"tags":[],"class_list":["post-57","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-guides","category-linux"],"_links":{"self":[{"href":"https:\/\/www.jaipurhosting.com\/blog\/wp-json\/wp\/v2\/posts\/57","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.jaipurhosting.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.jaipurhosting.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.jaipurhosting.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.jaipurhosting.com\/blog\/wp-json\/wp\/v2\/comments?post=57"}],"version-history":[{"count":13,"href":"https:\/\/www.jaipurhosting.com\/blog\/wp-json\/wp\/v2\/posts\/57\/revisions"}],"predecessor-version":[{"id":2324,"href":"https:\/\/www.jaipurhosting.com\/blog\/wp-json\/wp\/v2\/posts\/57\/revisions\/2324"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.jaipurhosting.com\/blog\/wp-json\/wp\/v2\/media\/1014"}],"wp:attachment":[{"href":"https:\/\/www.jaipurhosting.com\/blog\/wp-json\/wp\/v2\/media?parent=57"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.jaipurhosting.com\/blog\/wp-json\/wp\/v2\/categories?post=57"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.jaipurhosting.com\/blog\/wp-json\/wp\/v2\/tags?post=57"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}