{"id":506,"date":"2012-07-14T09:12:27","date_gmt":"2012-07-14T02:12:27","guid":{"rendered":"http:\/\/pridio.com\/?p=506"},"modified":"2012-09-08T16:34:02","modified_gmt":"2012-09-08T09:34:02","slug":"cai-wordpress-len-localhost","status":"publish","type":"post","link":"https:\/\/pridio.com\/en\/kien-thuc\/website-marketing\/cai-wordpress-len-localhost\/","title":{"rendered":"C\u00e0i WordPress l\u00ean localhost"},"content":{"rendered":"<p>\u0110\u1ec3 c\u00e0i wordpress l\u00ean localhost. M\u00e1y b\u1ea1n tr\u01b0\u1edbc h\u1ebft ph\u1ea3i c\u00e0i b\u1ed9 ch\u1ea1y bao g\u1ed3m: Apache, SQL, phpMyAdmin, PHP. Ch\u00fang t\u00f4i khuy\u1ebfn kh\u00edch b\u1ea1n c\u00e0i \u0111\u1eb7t m\u1ed9t c\u00e1ch \u0111\u01a1n gi\u1ea3n b\u1ed9 n\u00e0y b\u1eb1ng AppServ. C\u00e1c b\u1ea1n c\u00f3 th\u1ec3 xem b\u00e0i h\u01b0\u1edbng d\u1eabn c\u00e0i \u0111\u1eb7t AppServ <a title=\"AppServ\" href=\"http:\/\/pridio.com\/kien-thuc\/website-marketing\/huong-dan-cai-dat-appserv\/\" target=\"_blank\">t\u1ea1i \u0111\u00e2y<\/a>.<\/p>\n<h2>1. Edit httpd.conf c\u1ee7a Apache<\/h2>\n<p>C\u00e1c b\u1ea1n v\u00e0o Start &#8211;&gt; All programs &#8211;&gt; AppServ &#8211;&gt; Configuration Server &#8211;&gt;Apache Edit httpd.conf\u00a0Configuration File<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-507\" src=\"http:\/\/pridio.com\/wp-content\/uploads\/2012\/07\/Edit-httpd.conf_.jpg\" alt=\"Edit httpd.conf\" width=\"409\" height=\"633\" \/><\/p>\n<p>B\u1ecf d\u1ea5u # t\u1ea1i \u0111\u1ea7u 2 d\u00f2ng (c\u00f3 th\u1ec3 d\u00f9ng Ctrl + F \u0111\u1ec3 t\u00ecm cho nhanh)<\/p>\n<p><strong>LoadModule rewrite_module modules\/mod_rewrite.so<\/strong><\/p>\n<p><strong><\/strong><strong>Include conf\/extra\/httpd-vhosts.conf<\/strong><\/p>\n<h2>2. Gi\u1ea3i n\u00e9n WordPress<\/h2>\n<p>Tr\u01b0\u1edbc h\u1ebft b\u1ea1n h\u00e3y t\u00ecm down b\u1ea3n wordpress \u0111\u01b0\u1ee3c c\u1eadp nh\u1eadt v\u1ec1. B\u1ea1n c\u00f3 th\u1ec3 t\u1ea3i n\u00f3 t\u1ea1i trang c\u1ee7a <a title=\"wordpress.com\" href=\"http:\/\/wordpress.org\/download\/\" rel=\"nofollow\" target=\"_blank\">WordPress.com<\/a><\/p>\n<p>T\u1ea1o m\u1ed9t th\u01b0 m\u1ee5c mang t\u00ean mi\u1ec1n c\u1ee7a b\u1ea1n trong AppServ\/www, v\u00ed d\u1ee5 www.hocwordpress.com, gi\u1ea3i n\u00e9n file WordPress ra th\u01b0 m\u1ee5c \u0111\u00f3<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-508\" src=\"http:\/\/pridio.com\/wp-content\/uploads\/2012\/07\/unzip-wordpress.jpg\" alt=\"unzip wordpress\" width=\"771\" height=\"586\" \/><\/p>\n<h2>3. T\u1ea1o database cho wordpress<\/h2>\n<p>B\u1ea1n m\u1edf tr\u00ecnh duy\u1ec7t, v\u00e0o localhost\/phpmyadmin. Kh\u1edfi t\u1ea1o m\u1ed9t database theo \u00fd b\u1ea1n (v\u00ed d\u1ee5 hocwordpress). L\u01b0u \u00fd khi \u0111\u1eb7t t\u00ean database l\u00e0:<\/p>\n<p>&#8211; \u00a0 \u00a0\u00a0T\u00ean kh\u00f4ng \u0111\u01b0\u1ee3c tr\u00f9ng v\u1edbi data \u0111\u00e3 t\u1ea1o tr\u01b0\u1edbc \u0111\u00f3<\/p>\n<p>&#8211; \u00a0 \u00a0 T\u00ean kh\u00f4ng k\u1ebft th\u00fac b\u1eb1ng kho\u1ea3ng tr\u1eafng<\/p>\n<p>&#8211; \u00a0 \u00a0 T\u00ean kh\u00f4ng ch\u1ee9a c\u00e1c k\u00fd t\u1ef1 : \/, \\, ., :, *,\u2019\u2019,&lt;, &gt;<\/p>\n<p>&#8211; \u00a0 \u00a0 Chi\u1ec1u d\u00e0i 1 t\u00ean data ch\u1ee9 t\u1ed1i da 64 k\u00fd t\u1ef1 kh\u00f4ng d\u1ea5u<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-509\" src=\"http:\/\/pridio.com\/wp-content\/uploads\/2012\/07\/create-database.jpg\" alt=\"create database\" width=\"1163\" height=\"658\" \/><\/p>\n<p>Trong \u0111\u00f3:<\/p>\n<p>1. T\u00ean database: B\u1ea1n c\u00f3 th\u1ec3 \u0111\u1eb7t t\u00ean theo \u00fd b\u1ea1n<\/p>\n<p>2. Ng\u00f4n ng\u1eef: Ch\u1ecdn utf8_unicode_ci<\/p>\n<p>3. \u1ea4n <strong>Create<\/strong> \u0111\u1ec3 kh\u1edfi t\u1ea1o database<\/p>\n<h2>4. C\u1ea5u h\u00ecnh host v\u00e0\u00a0httpd-vhosts \u00a0theo domain<\/h2>\n<p>B\u1ea1n v\u00e0o file host c\u1ee7a windows (C:\\Windows\\system32\\drivers\\etc) th\u00eam d\u00f2ng<\/p>\n<p>127.0.0.1 hocwordpress.com\u00a0(nh\u1edb thay hocwordpress.com b\u1eb1ng t\u00ean trang b\u1ea1n ch\u1ecdn)<\/p>\n<p>B\u1ea1n ph\u1ea3i \u0111\u1eb7t quy\u1ec1n s\u1eeda cho file host \u0111\u1ec3 c\u00f3 th\u1ec3 l\u01b0u file host n\u00e0y l\u1ea1i.<\/p>\n<p>Sau \u0111\u00f3, t\u00ecm t\u1edbi file httpd-vhosts c\u1ee7a AppServ (C:\\AppServ\\Apache2.2\\conf\\extra) th\u00eam \u0111o\u1ea1n sau v\u00e0o cu\u1ed1i file r\u1ed3i l\u01b0u l\u1ea1i:<\/p>\n<p>&lt;VirtualHost *:80&gt;<br \/>\nServerAdmin info@pridio.com<br \/>\nDocumentRoot &#8220;C:\/AppServ\/www\/www.hocwordpress.com&#8221; \u00a0 \u00a0 (gi\u1ed1ng \u0111\u01b0\u1eddng d\u1eabn v\u00e0o th\u01b0 m\u1ee5c)<br \/>\nServername hocwordpress.com \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 (t\u00ean mi\u1ec1n kh\u00f4ng www)<br \/>\nServerAlias www.hocwordpress.com \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 (t\u00ean mi\u1ec1n c\u00f3 www)<br \/>\nErrorLog &#8220;logs\/dummy-host.x-error.log&#8221;<br \/>\nCustomLog\u00a0&#8220;logs\/dummy-host.x-access.log&#8221;\u00a0common<br \/>\n&lt;\/VirtualHost&gt;<\/p>\n<p>T\u1ea5t nhi\u00ean t\u00ean mi\u1ec1n hay \u0111\u01b0\u1eddng d\u1eabn b\u1ea1n ph\u1ea3i \u0111\u1ed5i theo \u0111\u00fang c\u00e1i b\u1ea1n \u0111\u00e3 \u0111\u1eb7t. File conf n\u00e0y tr\u1ecf domain v\u1ec1 admin<\/p>\n<p><em><strong>Note:<\/strong><\/em> Sau khi xong b\u01b0\u1edbc n\u00e0y b\u1ea1n ph\u1ea3i kh\u1edfi \u0111\u1ed9ng l\u1ea1i Apache, m\u00ecnh \u0111\u00e3 h\u01b0\u1edbng d\u1eabn trong b\u00e0i c\u00e0i \u0111\u1eb7t AppServ<\/p>\n<h2>5. S\u1eeda file wp-config.php<\/h2>\n<p>V\u00e0o l\u1ea1i th\u01b0 m\u1ee5c v\u1eeba c\u00e0i \u0111\u1eb7t wordpress (c\u1ee7a m\u00ecnh l\u00e0 www.hocwordpress.com). S\u1eeda t\u00ean file m\u1eb7c \u0111\u1ecbnh l\u00e0 wp-config-sample.php th\u00e0nh wp-config.php r\u1ed3i b\u1eadt n\u00f3 l\u00ean.<\/p>\n<p>T\u00ecm d\u00f2ng d\u01b0\u1edbi \u0111\u00e2y v\u1eeba s\u1eeda \u0111\u1ec3 tr\u1ecf trang c\u1ee7a b\u1ea1n v\u1ec1 database<\/p>\n<p>\/\/ ** MySQL settings &#8211; You can get this info from your web host ** \/\/<br \/>\n\/** The name of the database for WordPress *\/<br \/>\ndefine(&#8216;DB_NAME&#8217;, &#8216;hocwordpress&#8217;); \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 (tr\u1ecf v\u1ec1 t\u00ean database \u0111\u00e3 t\u1ea1o)<\/p>\n<p>\/** MySQL database username *\/<br \/>\ndefine(&#8216;DB_USER&#8217;, &#8216;root&#8217;); \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 (m\u1eb7c \u0111\u1ecbnh khi c\u00e0i appserv l\u00e0 &#8220;root&#8221;)<\/p>\n<p>\/** MySQL database password *\/<br \/>\ndefine(&#8216;DB_PASSWORD&#8217;, &#8216;yourpassword&#8217;); \u00a0 \u00a0 \u00a0 \u00a0(m\u1eadt kh\u1ea9u khi c\u00e0i appserv)<\/p>\n<p>\/** MySQL hostname *\/<br \/>\ndefine(&#8216;DB_HOST&#8217;, &#8216;localhost&#8217;); \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 (c\u00e1c d\u00f2ng d\u01b0\u1edbi th\u01b0\u1eddng b\u1ea1n \u0111\u1ec3 m\u1eb7c \u0111\u1ecbnh)<\/p>\n<p>\/** Database Charset to use in creating database tables. *\/<br \/>\ndefine(&#8216;DB_CHARSET&#8217;, &#8216;utf8&#8217;);<\/p>\n<p>\/** The Database Collate type. Don&#8217;t change this if in doubt. *\/<br \/>\ndefine(&#8216;DB_COLLATE&#8217;, &#8221;);<\/p>\n<h2>6. C\u00e0i \u0111\u1eb7t v\u00e0 s\u1eed d\u1ee5ng<\/h2>\n<p>Sau khi ho\u00e0n t\u1ea5t c\u00e1c b\u01b0\u1edbc tr\u00ean, b\u1ea1n b\u1eadt tr\u00ecnh duy\u1ec7t c\u1ee7a m\u00ecnh l\u00ean v\u00e0 g\u00f5 hocwordpress.com, m\u00e0n h\u00ecnh s\u1ebd hi\u1ec7n ra nh\u01b0 sau: (n\u1ebfu b\u00e1o l\u1ed7i b\u1ea1n th\u1edf reset l\u1ea1i apache l\u1ea7n n\u1eefa nh\u00e1)<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-512\" src=\"http:\/\/pridio.com\/wp-content\/uploads\/2012\/07\/setup-username.jpg\" alt=\"setup username\" width=\"763\" height=\"631\" \/><\/p>\n<p>Tr\u1eeb username th\u00ec c\u00e1c th\u1ee9 kh\u00e1c b\u1ea1n c\u00f3 th\u1ec3 thay \u0111\u1ed5i \u0111\u01b0\u1ee3c khi d\u00f9ng n\u00ean c\u0169ng kh\u00f4ng c\u1ea7n qu\u00e1 \u0111\u1eafn \u0111o khi nh\u1eadp. C\u00f2n n\u00fat &#8220;allow search engines find your site&#8221; th\u00ec kh\u00f4ng c\u1ea7n thi\u1ebft khi l\u00e0m vi\u1ec7c offline. Sau \u0111\u00f3 b\u1ea1n \u1ea5n <strong>Install wordpress<\/strong> v\u00e0 b\u1eaft \u0111\u1ea7u s\u1eed d\u1ee5ng<\/p>\n<p>Ch\u00fac c\u00e1c b\u1ea1n th\u00e0nh c\u00f4ng v\u00e0 vui v\u1ebb<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0110\u1ec3 c\u00e0i wordpress l\u00ean localhost. M\u00e1y b\u1ea1n tr\u01b0\u1edbc h\u1ebft ph\u1ea3i c\u00e0i b\u1ed9 ch\u1ea1y bao g\u1ed3m: Apache, SQL, phpMyAdmin, PHP. Ch\u00fang t\u00f4i khuy\u1ebfn kh\u00edch b\u1ea1n c\u00e0i \u0111\u1eb7t m\u1ed9t c\u00e1ch \u0111\u01a1n gi\u1ea3n b\u1ed9 n\u00e0y b\u1eb1ng AppServ. C\u00e1c b\u1ea1n c\u00f3 th\u1ec3 xem b\u00e0i&#8230;<\/p>\n","protected":false},"author":16,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"tags":[39,40,20,16,17],"class_list":["post-506","post","type-post","status-publish","format-standard","hentry","category-website-marketing","tag-cai-dat-wordpress","tag-cai-wordpres-len-localhost","tag-localhost","tag-quan-tri-wordpress","tag-wordpress-2"],"acf":[],"_links":{"self":[{"href":"https:\/\/pridio.com\/en\/wp-json\/wp\/v2\/posts\/506","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pridio.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pridio.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pridio.com\/en\/wp-json\/wp\/v2\/users\/16"}],"replies":[{"embeddable":true,"href":"https:\/\/pridio.com\/en\/wp-json\/wp\/v2\/comments?post=506"}],"version-history":[{"count":0,"href":"https:\/\/pridio.com\/en\/wp-json\/wp\/v2\/posts\/506\/revisions"}],"wp:attachment":[{"href":"https:\/\/pridio.com\/en\/wp-json\/wp\/v2\/media?parent=506"}],"wp:term":[{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pridio.com\/en\/wp-json\/wp\/v2\/tags?post=506"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}