{"id":3586,"date":"2012-07-22T18:08:06","date_gmt":"2012-07-22T10:08:06","guid":{"rendered":"https:\/\/webhostinggeeks.com\/howto\/?p=3586"},"modified":"2023-06-23T13:12:56","modified_gmt":"2023-06-23T13:12:56","slug":"how-to-setup-wordpress-blog-on-centos-6-3","status":"publish","type":"post","link":"https:\/\/webhostinggeeks.com\/howto\/how-to-setup-wordpress-blog-on-centos-6-3\/","title":{"rendered":"How to Setup WordPress Blog on CentOS 6.3"},"content":{"rendered":"<p><img decoding=\"async\" class=\"alignleft size-thumbnail wp-image-390 lazyload\" title=\"wordpress\" data-src=\"https:\/\/webhostinggeeks.com\/howto\/wp-content\/uploads\/2011\/02\/wordpress-150x150.jpg\" alt=\"\" width=\"150\" height=\"150\" data-srcset=\"https:\/\/webhostinggeeks.com\/howto\/wp-content\/uploads\/2011\/02\/wordpress-150x150.jpg 150w, https:\/\/webhostinggeeks.com\/howto\/wp-content\/uploads\/2011\/02\/wordpress-100x100.jpg 100w, https:\/\/webhostinggeeks.com\/howto\/wp-content\/uploads\/2011\/02\/wordpress.jpg 225w\" data-sizes=\"(max-width: 150px) 100vw, 150px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 150px; --smush-placeholder-aspect-ratio: 150\/150;\" \/>WordPress is an open-source blogging platform. It\u2019s a free blogging tool and content management system (CMS) based on PHP and MySQL. This steps covers how to install the WordPress on linux CentOS 6.3. This post assumed that PHP, apache and MySQL server has been setup properly.<\/p>\n<p>1. Login as a root, go to document&#8217; root folder and download latest wordpress file :<\/p>\n<pre>[root@centos63 ~]# cd \/var\/www\/html\/\n[root@centos63 html]# wget http:\/\/wordpress.org\/latest.tar.gz<\/pre>\n<p>2. Extract the lates.tar.gz files to current directory :<\/p>\n<pre>[root@centos63 html]# tar xvzf latest.tar.gz<\/pre>\n<p>3. Now create wordpress database. Login to your mySQL database :<\/p>\n<pre>[root@centos63 ~]# mysql -u root -p\nEnter password:\nWelcome to the MySQL monitor.  Commands end with ; or \\g.\nYour MySQL connection id is 3\nServer version: 5.1.61 Source distribution\n\nCopyright (c) 2000, 2011, Oracle and\/or its affiliates. All rights reserved.\n\nOracle is a registered trademark of Oracle Corporation and\/or its\naffiliates. Other names may be trademarks of their respective\nowners.\n\nType 'help;' or '\\h' for help. Type '\\c' to clear the current input statement.<\/pre>\n<p>4. Create Database name \u201cwordpressdb\u201d :<\/p>\n<pre>mysql&gt; CREATE DATABASE wordpressdb;\nQuery OK, 1 row affected (0.08 sec)<\/pre>\n<p>5. Create user \u201cwordpressuser\u201d with password \u201cwordpresspassword\u201d :<\/p>\n<pre>mysql&gt; CREATE USER 'wordpressuser'@'localhost' IDENTIFIED BY 'wordpresspassword';\nQuery OK, 0 rows affected (0.06 sec)<\/pre>\n<p>6. Grant all privileges to \u201cwordpressdb\u201d to user \u201d wordpressuser\u201d from localhost access :<\/p>\n<pre>mysql&gt; GRANT ALL PRIVILEGES ON wordpressdb.* to wordpressuser@localhost;\nQuery OK, 0 rows affected (0.04 sec)<\/pre>\n<p>7. Check and verify the granted access for user \u201cwordpressuser\u201d :<\/p>\n<pre>mysql&gt; SHOW GRANTS FOR 'wordpressuser'@'localhost';\n+----------------------------------------------------------------------------------------------------------------------+\n| Grants for wordpressuser@localhost                                                                                   |\n+----------------------------------------------------------------------------------------------------------------------+\n| GRANT USAGE ON *.* TO 'wordpressuser'@'localhost' IDENTIFIED BY PASSWORD '*E62D3F829F44A91CC231C76347712772B3B9DABC' |\n| GRANT ALL PRIVILEGES ON `wordpressdb`.* TO 'wordpressuser'@'localhost'                                               |\n+----------------------------------------------------------------------------------------------------------------------+\n2 rows in set (0.08 sec)\n\nmysql&gt;<\/pre>\n<p>8. For higher security, make wordpress folder readable only from browser :<\/p>\n<pre>[root@centos63 ~]# chmod 755 \/var\/www\/html\/wordpress<\/pre>\n<p>9. Go to your web server terminal or ssh to web server. Copy and rename wp-config-sample.php to wp-config.php:<\/p>\n<pre>[root@centos63 ~]# cp \/var\/www\/html\/wordpress\/wp-config-sample.php \/var\/www\/html\/wordpress\/wp-config.php<\/pre>\n<p>10. Modify the wp-config.php :<\/p>\n<pre>[root@centos63 ~]# vi \/var\/www\/html\/blog\/wp-config.php<\/pre>\n<p>Change below database details such as database&#8217; name, database&#8217; username, database&#8217; password nand database&#8217; hostname.<\/p>\n<pre>\/\/ ** MySQL settings - You can get this info from your web host ** \/\/\n\/** The name of the database for WordPress *\/\ndefine('DB_NAME', 'wordpressdb');\n\n\/** MySQL database username *\/\ndefine('DB_USER', 'wordpressuser');\n\n\/** MySQL database password *\/\ndefine('DB_PASSWORD', 'wordpresspassword');\n\n\/** MySQL hostname *\/\ndefine('DB_HOST', 'localhost');<\/pre>\n<p>11. To configure wordpress, navigate the browser to http:\/\/servername\/wordpress\/. Please complete the form Click \u201cInstall WordPress\u201d<\/p>\n<p>Site Title : Blog Title<br \/>\nUsername : Prefered username<br \/>\nPassword, twice : Your password<br \/>\nYour E-mail : Your Email<\/p>\n<p><img decoding=\"async\" class=\"alignnone lazyload\" title=\"wordpress\" data-src=\"http:\/\/1.bp.blogspot.com\/-810lBum0NXs\/UAvP6sLdl-I\/AAAAAAAADOg\/p90i5xpb1kU\/s1600\/wordpress2.png\" alt=\"wordpress\" width=\"583\" height=\"484\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 583px; --smush-placeholder-aspect-ratio: 583\/484;\" \/><\/p>\n<p>12. To login, navigate the browser to http:\/\/servername\/wordpress\/wp-login.php :<br \/>\n<img decoding=\"async\" class=\"alignnone lazyload\" title=\"wordpress\" data-src=\"http:\/\/4.bp.blogspot.com\/-IqSvvEuX0zs\/UAvP64TPk8I\/AAAAAAAADOs\/WCerOLnm86A\/s1600\/wordpress3.png\" alt=\"wordpress\" width=\"590\" height=\"342\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 590px; --smush-placeholder-aspect-ratio: 590\/342;\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>WordPress is an open-source blogging platform. It\u2019s a free blogging tool and content management system (CMS) based on PHP and MySQL. This steps covers how to install the WordPress on&#8230;<\/p>\n","protected":false},"author":6,"featured_media":390,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"wds_primary_category":0,"footnotes":""},"categories":[2055,1008],"tags":[1254,1536,1546,1933,1934],"class_list":["post-3586","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-centos","category-mysql","tag-centos-6-3","tag-linux","tag-linux-utilities","tag-wordpress","tag-wordpress-plugins"],"_links":{"self":[{"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/posts\/3586","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/comments?post=3586"}],"version-history":[{"count":0,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/posts\/3586\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/media\/390"}],"wp:attachment":[{"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/media?parent=3586"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/categories?post=3586"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/tags?post=3586"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}