{"id":421,"date":"2018-06-29T16:45:42","date_gmt":"2018-06-29T09:45:42","guid":{"rendered":"https:\/\/lagonet.vn\/?p=421"},"modified":"2018-06-29T16:45:42","modified_gmt":"2018-06-29T09:45:42","slug":"421","status":"publish","type":"post","link":"https:\/\/kb.lagonet.vn\/?p=421","title":{"rendered":""},"content":{"rendered":"<h1 class=\"post-title single-post-title\" style=\"text-align: center;\"><strong>CHUY\u1ec2N WORDPRESS T\u1eea LOCALHOST L\u00caN HOST TH\u1ee6 C\u00d4NG<\/strong><\/h1>\n<p>&nbsp;<\/p>\n<div class=\"ast-oembed-container \" style=\"height: 100%;\"><iframe loading=\"lazy\" title=\"[WP c\u01a1 b\u1ea3n - 33] Chuy\u1ec3n website WordPress t\u1eeb localhost l\u00ean host\" width=\"500\" height=\"281\" src=\"https:\/\/www.youtube.com\/embed\/9tG3CUERl_Y?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe><\/div>\n<p>Sau nhi\u1ec1u b\u00e0i h\u01b0\u1edbng d\u1eabn ch\u1eafc b\u1ea1n c\u0169ng c\u00f3 ch\u00fat m\u1ec7t m\u1ecfi r\u1ed3i \u0111\u00fang kh\u00f4ng? Nh\u01b0ng \u0111\u00f3 ch\u1ec9 l\u00e0 m\u1edbi b\u1eaft \u0111\u1ea7u m\u00e0 th\u00f4i, k\u1ec3 t\u1eeb khi website c\u1ee7a b\u1ea1n \u0111\u00e3 \u0111\u01b0\u1ee3c y\u00ean v\u1ecb tr\u00ean m\u00f4i tr\u01b0\u1eddng internet b\u1eb1ng c\u00e1ch \u0111\u01b0a l\u00ean host, c\u00f4ng cu\u1ed9c qu\u1ea3n tr\u1ecb website c\u1ee7a b\u1ea1n s\u1ebd th\u00fa v\u1ecb h\u01a1n nhi\u1ec1u khi m\u00e0 b\u1ea1n c\u00f3 th\u1ec3 g\u1eedi website c\u1ee7a m\u00ecnh cho nh\u1eefng b\u1ea1n b\u00e8 kh\u00e1c c\u00f9ng xem, \u0111\u00f3n nh\u1eadn nh\u1eefng l\u01b0\u1ee3t truy c\u1eadp \u0111\u1ea7u ti\u00ean.<\/p>\n<p>Trong b\u00e0i h\u01b0\u1edbng d\u1eabn n\u00e0y, ch\u00fang ta s\u1ebd l\u00e0m b\u01b0\u1edbc chuy\u1ec3n m\u1ed9t website WordPress m\u00e0 b\u1ea1n \u0111\u00e3 l\u00e0m \u1edf localhost trong nh\u1eefng b\u00e0i \u0111\u1ea7u ti\u00ean c\u1ee7a\u00a0<a title=\"H\u1ecdc WordPress c\u01a1 b\u1ea3n mi\u1ec5n ph\u00ed\" href=\"https:\/\/thachpham.com\/wordpress\/wordpress-tutorials\/serie-hoc-wordpress-co-ban-2013.html\" target=\"_blank\" rel=\"noopener\" data-wpel-link=\"internal\">serie h\u1ecdc WordPress c\u0103n b\u1ea3n<\/a>\u00a0n\u00e0y, sau \u0111\u00f3 thi\u1ebft l\u1eadp t\u00ean mi\u1ec1n cho n\u00f3 \u0111\u1ec3 ch\u1ea1y nh\u01b0 m\u1ed9t website th\u1ef1c th\u1ee5. H\u01b0\u1edbng d\u1eabn n\u00e0y m\u00ecnh s\u1ebd l\u00e0m ho\u00e0n to\u00e0n b\u1eb1ng th\u1ee7 c\u00f4ng \u0111\u1ec3 b\u1ea1n l\u00e0m quen v\u1edbi c\u00e1c thao t\u00e1c c\u01a1 b\u1ea3n trong vi\u1ec7c qu\u1ea3n tr\u1ecb website.<\/p>\n<p>Tr\u01b0\u1edbc ti\u00ean, h\u00e3y v\u00e0o host c\u1ee7a b\u1ea1n qua FTP, x\u00f3a h\u1ebft c\u00e1c th\u01b0 m\u1ee5c v\u00e0 t\u1eadp tin kh\u00f4ng c\u1ea7n thi\u1ebft t\u1ea1i th\u01b0 m\u1ee5c\u00a0<strong>public_html<\/strong>\u00a0\u0111i \u0111\u1ec3 \u0111\u1ee1 r\u1eafc r\u1ed1i v\u1ec1 sau nh\u00e9.<\/p>\n<p><strong>M\u1ed9t s\u1ed1 l\u01b0u \u00fd tr\u01b0\u1edbc khi chuy\u1ec3n website t\u1eeb localhost l\u00ean host<\/strong><\/p>\n<ul>\n<li>B\u1ea1n ph\u1ea3i t\u1eaft c\u00e1c plugin h\u1ed7 tr\u1ee3 t\u1ea1o cache nh\u01b0 WP Super Cache,\u00a0<a href=\"https:\/\/thachpham.com\/wordpress\/wp-plugin\/huong-dan-w3-total-cache-toan-tap.html\" data-wpel-link=\"internal\">W3 Total Cache<\/a>\u00a0v\u00e0 x\u00f3a n\u00f3 \u0111i. Sau khi chuy\u1ec3n l\u00ean host xong th\u00ec c\u00e0i l\u1ea1i t\u1eeb \u0111\u1ea7u.<\/li>\n<li>T\u00ean mi\u1ec1n ph\u1ea3i \u0111\u00e3 \u0111\u01b0\u1ee3c tr\u1ecf v\u1ec1 host.<\/li>\n<li>H\u00e3y ch\u1eafc ch\u1eafn website c\u1ee7a b\u1ea1n \u1edf localhost kh\u00f4ng c\u00f3 qu\u00e1 nhi\u1ec1u d\u1eef li\u1ec7u v\u00ec c\u00e0ng nhi\u1ec1u d\u1eef li\u1ec7u, nhi\u1ec1u plugin th\u00ec s\u1ebd d\u1ec5 b\u1ecb l\u1ed7i h\u01a1n.<\/li>\n<\/ul>\n<h3 id=\"ftoc-heading-1\" class=\"ftwp-heading\">B\u01b0\u1edbc 1. N\u00e9n th\u01b0 m\u1ee5c WordPress \u1edf localhost th\u00e0nh .zip<\/h3>\n<p>B\u00e2y gi\u1edd b\u1ea1n h\u00e3y v\u00e0o localhost t\u1ea1i th\u01b0 m\u1ee5c\u00a0<strong>C:\\\\xampp\\htdocs\\th\u01b0-m\u1ee5c-c\u1ee7a-b\u1ea1n<\/strong>, ch\u1ecdn t\u1ea5t c\u1ea3 th\u01b0 m\u1ee5c v\u00e0 t\u1eadp tin c\u00f3 trong \u0111\u00f3 \u2013&gt; \u1ea5n chu\u1ed9t ph\u1ea3i \u2013&gt; Send to \u2013&gt; Compressed (zip)<\/p>\n<p><a href=\"https:\/\/thachpham.com\/wp-content\/uploads\/2015\/01\/localhost-to-host-01.jpg\" data-rel=\"penci-gallery-image-content\" data-wpel-link=\"internal\"><img loading=\"lazy\" decoding=\"async\" title=\"localhost-to-host-01\" src=\"https:\/\/thachpham.com\/wp-content\/uploads\/2015\/01\/localhost-to-host-01_thumb.jpg\" alt=\"localhost-to-host-01\" width=\"850\" height=\"602\" border=\"0\" \/><\/a><\/p>\n<p>Sau \u0111\u00f3 b\u1ea1n s\u1ebd \u0111\u01b0\u1ee3c m\u1ed9t file .zip ch\u1ee9a c\u00e1c t\u1eadp tin v\u00e0 th\u01b0 m\u1ee5c website, h\u00e3y \u0111\u1ed5i t\u00ean file \u0111\u00f3 l\u1ea1i th\u00e0nh g\u00ec b\u1ea1n th\u00edch (website.zip ch\u1eb3ng h\u1ea1n).<\/p>\n<p><a href=\"https:\/\/thachpham.com\/wp-content\/uploads\/2015\/01\/localhost-to-host-02.jpg\" data-rel=\"penci-gallery-image-content\" data-wpel-link=\"internal\"><img loading=\"lazy\" decoding=\"async\" title=\"localhost-to-host-02\" src=\"https:\/\/thachpham.com\/wp-content\/uploads\/2015\/01\/localhost-to-host-02_thumb.jpg\" alt=\"localhost-to-host-02\" width=\"850\" height=\"751\" border=\"0\" \/><\/a><\/p>\n<h3 id=\"ftoc-heading-2\" class=\"ftwp-heading\">B\u01b0\u1edbc 2. Upload v\u00e0 gi\u1ea3i n\u00e9n tr\u00ean host<\/h3>\n<p>K\u1ebf ti\u1ebfp b\u1ea1n \u0111\u0103ng nh\u1eadp v\u00e0o control panel c\u1ee7a host, v\u00e0o File Manager v\u00e0 upload t\u1eadp tin n\u00e9n website.zip l\u00ean th\u01b0 m\u1ee5c g\u1ed1c (public_html) n\u1ebfu b\u1ea1n c\u00f3 nhu c\u1ea7u s\u1eed d\u1ee5ng website v\u1edbi t\u00ean mi\u1ec1n g\u1ed1c l\u00e0 http:\/\/t\u00ean-mi\u1ec1n-c\u1ee7a-b\u1ea1n.com\/, n\u1ebfu b\u1ea1n mu\u1ed1n c\u00e0i n\u00f3 v\u00e0o m\u1ed9t th\u01b0 m\u1ee5c n\u00e0o \u0111\u00f3 nh\u01b0 http:\/\/t\u00ean-mi\u1ec1n-c\u1ee7a-b\u1ea1n.com\/th\u01b0-m\u1ee5c\/ th\u00ec c\u1ee9 t\u1ea1o m\u1ed9t th\u01b0 m\u1ee5c r\u1ed3i upload l\u00ean.<\/p>\n<p>Upload xong, h\u00e3y \u1ea5n chu\u1ed9t ph\u1ea3i v\u00e0o file .zip n\u00e0y v\u1eeba ch\u1ecdn Extract.<\/p>\n<p><a href=\"https:\/\/thachpham.com\/wp-content\/uploads\/2015\/01\/localhost-to-host-03.jpg\" data-rel=\"penci-gallery-image-content\" data-wpel-link=\"internal\"><img loading=\"lazy\" decoding=\"async\" title=\"localhost-to-host-03\" src=\"https:\/\/thachpham.com\/wp-content\/uploads\/2015\/01\/localhost-to-host-03_thumb.jpg\" alt=\"localhost-to-host-03\" width=\"850\" height=\"531\" border=\"0\" \/><\/a><\/p>\n<p>Gi\u1ea3i n\u00e9n xong b\u1ea1n s\u1ebd c\u00f3 c\u00e1c th\u01b0 m\u1ee5c v\u00e0 t\u1eadp tin c\u1ee7a WordPress tr\u00ean host th\u1ebf n\u00e0y.<\/p>\n<p><a href=\"https:\/\/thachpham.com\/wp-content\/uploads\/2015\/01\/localhost-to-host-04.jpg\" data-rel=\"penci-gallery-image-content\" data-wpel-link=\"internal\"><img loading=\"lazy\" decoding=\"async\" title=\"localhost-to-host-04\" src=\"https:\/\/thachpham.com\/wp-content\/uploads\/2015\/01\/localhost-to-host-04_thumb.jpg\" alt=\"localhost-to-host-04\" width=\"850\" height=\"432\" border=\"0\" \/><\/a><\/p>\n<h3 id=\"ftoc-heading-3\" class=\"ftwp-heading\">B\u01b0\u1edbc 3. Xu\u1ea5t database \u1edf localhost<\/h3>\n<p>B\u00e2y gi\u1edd b\u1ea1n h\u00e3y t\u1ea1o m\u1ed9t database tr\u00ean host \u0111\u1ec3 s\u1eed d\u1ee5ng n\u00f3 cho website WordPress, c\u00e1ch t\u1ea1o database m\u00ecnh \u0111\u00e3 c\u00f3 n\u00f3i t\u1ea1i \u0111\u00e2y r\u1ed3i.<\/p>\n<p>V\u00e0 h\u00e3y truy c\u1eadp v\u00e0o phpMyAdmin tr\u00ean localhost theo \u0111\u1ecba ch\u1ec9 http:\/\/localhost\/phpMyAdmin v\u00e0 ch\u1ecdn database m\u00e0 b\u1ea1n \u0111\u00e3 c\u00e0i WordPress \u1edf localhost l\u00ean \u0111\u00f3.<\/p>\n<p><a href=\"https:\/\/thachpham.com\/wp-content\/uploads\/2015\/01\/localhost-to-host-05.jpg\" data-rel=\"penci-gallery-image-content\" data-wpel-link=\"internal\"><img loading=\"lazy\" decoding=\"async\" title=\"localhost-to-host-05\" src=\"https:\/\/thachpham.com\/wp-content\/uploads\/2015\/01\/localhost-to-host-05_thumb.jpg\" alt=\"localhost-to-host-05\" width=\"850\" height=\"599\" border=\"0\" \/><\/a><\/p>\n<p>Sau \u0111\u00f3 ch\u1ecdn Export v\u00e0 \u1ea5n Go.<\/p>\n<p><a href=\"https:\/\/thachpham.com\/wp-content\/uploads\/2015\/01\/localhost-to-host-06.jpg\" data-rel=\"penci-gallery-image-content\" data-wpel-link=\"internal\"><img loading=\"lazy\" decoding=\"async\" title=\"localhost-to-host-06\" src=\"https:\/\/thachpham.com\/wp-content\/uploads\/2015\/01\/localhost-to-host-06_thumb.jpg\" alt=\"localhost-to-host-06\" width=\"850\" height=\"492\" border=\"0\" \/><\/a><\/p>\n<p>L\u00fac n\u00e0y b\u1ea1n s\u1ebd \u0111\u01b0\u1ee3c m\u1ed9t t\u1eadp tin c\u00f3 ph\u1ea7n m\u1edf r\u1ed9ng l\u00e0 .sql, \u0111\u00f3 ch\u00ednh l\u00e0 t\u1eadp tin ch\u1ee9a to\u00e0n b\u1ed9 database c\u1ee7a website b\u1ea1n.<\/p>\n<h3 id=\"ftoc-heading-4\" class=\"ftwp-heading\">B\u01b0\u1edbc 4. Nh\u1eadp database v\u00e0o host<\/h3>\n<p>B\u00e2y gi\u1edd b\u1ea1n h\u00e3y truy c\u1eadp v\u00e0o control panel c\u1ee7a host v\u00e0 t\u00ecm \u0111\u1ebfn ph\u1ea7n phpMyAdmin.<\/p>\n<p><a href=\"https:\/\/thachpham.com\/wp-content\/uploads\/2015\/01\/localhost-to-host-07.jpg\" data-rel=\"penci-gallery-image-content\" data-wpel-link=\"internal\"><img loading=\"lazy\" decoding=\"async\" title=\"localhost-to-host-07\" src=\"https:\/\/thachpham.com\/wp-content\/uploads\/2015\/01\/localhost-to-host-07_thumb.jpg\" alt=\"localhost-to-host-07\" width=\"850\" height=\"301\" border=\"0\" \/><\/a><\/p>\n<p>Sau \u0111\u00f3 ch\u1ecdn database m\u00e0 b\u1ea1n m\u1edbi t\u1ea1o ra (database n\u00e0y ph\u1ea3i m\u1edbi ho\u00e0n to\u00e0n).<\/p>\n<p><a href=\"https:\/\/thachpham.com\/wp-content\/uploads\/2015\/01\/localhost-to-host-0.jpg\" data-rel=\"penci-gallery-image-content\" data-wpel-link=\"internal\"><img loading=\"lazy\" decoding=\"async\" title=\"localhost-to-host-0\" src=\"https:\/\/thachpham.com\/wp-content\/uploads\/2015\/01\/localhost-to-host-0_thumb.jpg\" alt=\"localhost-to-host-0\" width=\"850\" height=\"549\" border=\"0\" \/><\/a><\/p>\n<p>Sau \u0111\u00f3 ch\u1ecdn Import, upload file .sql \u1edf m\u00e1y t\u00ednh c\u1ee7a b\u1ea1n l\u00ean, c\u00e1c thi\u1ebft l\u1eadp kh\u00e1c \u0111\u1ec3 nguy\u00ean v\u00e0 \u1ea5n Go.<\/p>\n<p><a href=\"https:\/\/thachpham.com\/wp-content\/uploads\/2015\/01\/localhost-to-host-09.jpg\" data-rel=\"penci-gallery-image-content\" data-wpel-link=\"internal\"><img loading=\"lazy\" decoding=\"async\" title=\"localhost-to-host-09\" src=\"https:\/\/thachpham.com\/wp-content\/uploads\/2015\/01\/localhost-to-host-09_thumb.jpg\" alt=\"localhost-to-host-09\" width=\"850\" height=\"584\" border=\"0\" \/><\/a><\/p>\n<p>Th\u00f4ng b\u00e1o hi\u1ec3n th\u1ecb \u0111\u00e3 nh\u1eadp d\u1eef li\u1ec7u th\u00e0nh c\u00f4ng.<\/p>\n<p><a href=\"https:\/\/thachpham.com\/wp-content\/uploads\/2015\/01\/localhost-to-host-10.jpg\" data-rel=\"penci-gallery-image-content\" data-wpel-link=\"internal\"><img loading=\"lazy\" decoding=\"async\" title=\"localhost-to-host-10\" src=\"https:\/\/thachpham.com\/wp-content\/uploads\/2015\/01\/localhost-to-host-10_thumb.jpg\" alt=\"localhost-to-host-10\" width=\"850\" height=\"368\" border=\"0\" \/><\/a><\/p>\n<h3 id=\"ftoc-heading-5\" class=\"ftwp-heading\">B\u01b0\u1edbc 5. S\u1eeda t\u1eadp tin c\u1ea5u h\u00ecnh c\u1ee7a WordPress<\/h3>\n<p>Do \u1edf localhost, ch\u00fang ta \u0111\u00e3 c\u00e0i \u0111\u1eb7t website WordPress v\u1edbi th\u00f4ng tin database kh\u00e1c ho\u00e0n to\u00e0n v\u1edbi th\u00f4ng tin database tr\u00ean host n\u00ean ch\u00fang ta ph\u1ea3i s\u1eeda c\u00e1c th\u00f4ng tin \u0111\u00f3 l\u1ea1i cho kh\u1edbp v\u1edbi th\u00f4ng tin database tr\u00ean host th\u00ec website m\u1edbi c\u00f3 th\u1ec3 ch\u1ea1y \u0111\u01b0\u1ee3c.<\/p>\n<p>B\u00e2y gi\u1edd b\u1ea1n h\u00e3y \u0111\u0103ng nh\u1eadp v\u00e0o FTP b\u1eb1ng FileZilla, v\u00e0o th\u01b0 m\u1ee5c \u0111ang ch\u1ee9a m\u00e3 ngu\u1ed3n website WordPress v\u00e0 t\u00ecm \u0111\u1ebfn file t\u00ean l\u00e0 wp-config.php v\u00e0 m\u1edf n\u00f3 l\u00ean.<\/p>\n<p><a href=\"https:\/\/thachpham.com\/wp-content\/uploads\/2015\/01\/localhost-to-host-11.jpg\" data-rel=\"penci-gallery-image-content\" data-wpel-link=\"internal\"><img loading=\"lazy\" decoding=\"async\" title=\"localhost-to-host-11\" src=\"https:\/\/thachpham.com\/wp-content\/uploads\/2015\/01\/localhost-to-host-11_thumb.jpg\" alt=\"localhost-to-host-11\" width=\"850\" height=\"645\" border=\"0\" \/><\/a><\/p>\n<p>N\u00f3 c\u00f3 h\u1ecfi g\u00ec th\u00ec c\u1ee9 \u1ea5n Ok \u0111i, sau \u0111\u00f3 b\u1ea1n ch\u00e8n \u0111o\u1ea1n sau v\u00e0o b\u00ean d\u01b0\u1edbi &lt;?php trong t\u1eadp tin wp-config.php:<\/p>\n<pre>define('WP_HOME','http:\/\/example.com');\ndefine('WP_SITEURL','http:\/\/example.com');\n<\/pre>\n<p>Nh\u1edb thay example.com th\u00e0nh t\u00ean mi\u1ec1n m\u00e0 b\u1ea1n \u0111\u00e3 th\u00eam v\u00e0o host, v\u00ed d\u1ee5 c\u1ee7a m\u00ecnh l\u00e0 thachpham.tv.<\/p>\n<p><a href=\"https:\/\/thachpham.com\/wp-content\/uploads\/2015\/01\/localhost-to-host-12.jpg\" data-rel=\"penci-gallery-image-content\" data-wpel-link=\"internal\"><img loading=\"lazy\" decoding=\"async\" title=\"localhost-to-host-12\" src=\"https:\/\/thachpham.com\/wp-content\/uploads\/2015\/01\/localhost-to-host-12_thumb.jpg\" alt=\"localhost-to-host-12\" width=\"850\" height=\"648\" border=\"0\" \/><\/a><\/p>\n<p>Ti\u1ebfp t\u1ee5c t\u00ecm \u0111\u1ebfn \u0111o\u1ea1n\u00a0<strong>DB_NAME<\/strong>, s\u1eeda gi\u00e1 tr\u1ecb trong c\u1eb7p d\u1ea5u \u2018 \u2019 \u1edf \u0111\u1eb1ng sau th\u00e0nh t\u00ean database c\u1ee7a b\u1ea1n tr\u00ean host, t\u00ecm\u00a0<strong>DB_USER<\/strong>\u00a0v\u00e0 s\u1eeda gi\u00e1 tr\u1ecb c\u1ee7a n\u00f3 trong d\u1ea5u\u00a0 \u2018 \u2018 \u1edf \u0111\u1eb1ng sau th\u00e0nh t\u00ean username c\u1ee7a database tr\u00ean host, t\u00ecm\u00a0<strong>DB_PASSWORD<\/strong>\u00a0v\u00e0 s\u1eeda gi\u00e1 tr\u1ecb trong c\u1eb7p d\u1ea5u \u2018 \u2018 \u0111\u1eb1ng sau th\u00e0nh password c\u1ee7a database username. T\u1ea5t c\u1ea3 gi\u00e1 tr\u1ecb \u0111\u1ec1u ph\u1ea3i vi\u1ebft trong c\u1eb7p d\u1ea5u nh\u00e1y ch\u1ee9 kh\u00f4ng n\u00f3 s\u1ebd b\u1ecb l\u1ed7i.<\/p>\n<p><a href=\"https:\/\/thachpham.com\/wp-content\/uploads\/2015\/01\/localhost-to-host-13.jpg\" data-rel=\"penci-gallery-image-content\" data-wpel-link=\"internal\"><img loading=\"lazy\" decoding=\"async\" title=\"localhost-to-host-13\" src=\"https:\/\/thachpham.com\/wp-content\/uploads\/2015\/01\/localhost-to-host-13_thumb.jpg\" alt=\"localhost-to-host-13\" width=\"850\" height=\"641\" border=\"0\" \/><\/a>C\u00f2n c\u00e1i\u00a0<strong>DB_HOST<\/strong>\u00a0th\u00ec \u0111a ph\u1ea7n hi\u1ec7n nay ch\u00fang ta \u0111\u1ec1u ghi l\u00e0\u00a0<strong>localhost<\/strong>, tr\u1eeb m\u1ed9t s\u1ed1 nh\u00e0 cung c\u1ea5p host c\u00e1 bi\u1ec7t h\u1ecd s\u1ebd d\u00f9ng c\u00e1i Database Host t\u00ean kh\u00e1c nh\u01b0ng r\u1ea5t hi\u1ebfm.<\/p>\n<p>S\u1eeda xong, l\u01b0u file n\u00e0y l\u1ea1i, t\u1eaft c\u1eeda s\u1ed5 file \u0111\u00f3 \u0111i r\u1ed3i b\u1ea1n s\u1ebd th\u1ea5y n\u00f3 h\u1ecfi l\u00e0 c\u00f3 mu\u1ed1n upload l\u00ean l\u1ea1i kh\u00f4ng, \u1ea5n Yes.<\/p>\n<p><a href=\"https:\/\/thachpham.com\/wp-content\/uploads\/2015\/01\/localhost-to-host-14.jpg\" data-rel=\"penci-gallery-image-content\" data-wpel-link=\"internal\"><img loading=\"lazy\" decoding=\"async\" title=\"localhost-to-host-14\" src=\"https:\/\/thachpham.com\/wp-content\/uploads\/2015\/01\/localhost-to-host-14_thumb.jpg\" alt=\"localhost-to-host-14\" width=\"500\" height=\"435\" border=\"0\" \/><\/a><\/p>\n<h3 id=\"ftoc-heading-6\" class=\"ftwp-heading\">B\u01b0\u1edbc 6. C\u1eadp nh\u1eadt Permalink<\/h3>\n<p>Qu\u00e1 tr\u00ecnh \u0111\u00e3 ho\u00e0n t\u1ea5t, b\u00e2y gi\u1edd b\u1ea1n th\u1eed truy c\u1eadp v\u00e0o \u0111\u1ecba ch\u1ec9 Dashboard c\u1ee7a website WordPress theo \u0111\u1ecba ch\u1ec9 http:\/\/t\u00ean-mi\u1ec1n-c\u1ee7a-b\u1ea1n.com\/wp-admin v\u00e0 \u0111\u0103ng nh\u1eadp. Sau \u0111\u00f3 v\u00e0o\u00a0<strong>Settings \u2013&gt; Permalinks<\/strong>\u00a0v\u00e0 \u1ea5n n\u00fat Save Change \u0111\u1ec3 n\u00f3 c\u1eadp nh\u1eadt l\u1ea1i permalink n\u1ebfu b\u1ea1n c\u00f3 thi\u1ebft l\u1eadp, n\u1ebfu kh\u00f4ng s\u1ebd b\u1ecb l\u1ed7i 404 khi v\u00e0o xem c\u00e1c post v\u00e0 page.<\/p>\n<p>N\u1ebfu b\u1ea1n v\u00e0o website m\u00e0 g\u1eb7p l\u1ed7i \u201c<strong>Error establishing a database connection<\/strong>\u201d ngh\u0129a l\u00e0 b\u1ea1n nh\u1eadp th\u00f4ng tin database b\u1ecb sai, h\u00e3y ki\u1ec3m tra l\u1ea1i th\u00f4ng tin v\u00e0 nh\u1eadp cho ch\u00ednh x\u00e1c.<\/p>\n<h3 id=\"ftoc-heading-7\" class=\"ftwp-heading\">B\u01b0\u1edbc 7. Thay th\u1ebf t\u00ean mi\u1ec1n c\u0169 \u1edf localhost th\u00e0nh t\u00ean mi\u1ec1n m\u1edbi<\/h3>\n<p>Khi b\u1ea1n l\u00e0m website \u1edf localhost th\u00ec c\u00e1c \u0111\u01b0\u1eddng d\u1eabn nh\u01b0 h\u00ecnh \u1ea3nh trong b\u00e0i vi\u1ebft \u0111\u1ec1u mang t\u00ean mi\u1ec1n \u1edf localhost, nh\u01b0 v\u1eady ch\u1ec9 b\u1ea1n m\u1edbi th\u1ea5y \u0111\u01b0\u1ee3c th\u00f4i. B\u00e2y gi\u1edd nhi\u1ec7m v\u1ee5 c\u1ee7a ch\u00fang ta l\u00e0 thay th\u1ebf c\u00e1c t\u00ean mi\u1ec1n c\u0169 \u1edf localhost th\u00e0nh t\u00ean mi\u1ec1n ch\u00ednh th\u1ee9c c\u1ee7a website th\u00f4ng qua m\u1ed9t plugin.<\/p>\n<p>B\u1ea1n h\u00e3y\u00a0<a href=\"https:\/\/thachpham.com\/wordpress\/wordpress-tutorials\/tim-va-cai-plugin.html\" data-wpel-link=\"internal\">c\u00e0i plugin<\/a>\u00a0t\u00ean l\u00e0\u00a0<a href=\"https:\/\/wordpress.org\/plugins\/better-search-replace\/screenshots\/\" target=\"_blank\" rel=\"nofollow external noopener noreferrer\" data-wpel-link=\"external\"><strong>Better Search Replace<\/strong><\/a>\u00a0v\u00e0 k\u00edch ho\u1ea1t n\u00f3 l\u00ean. K\u1ebf ti\u1ebfp l\u00e0 v\u00e0o\u00a0<strong>Tools \u2013&gt; Better Search Replace.<br \/>\n<\/strong><\/p>\n<p>\u1ede khung Search for, b\u1ea1n nh\u1eadp chu\u1ed7i k\u00fd t\u1ef1 c\u1ea7n t\u00ecm, chu\u1ed7i k\u00fd t\u1ef1 \u1edf \u0111\u00e2y ch\u00ednh l\u00e0 c\u00e1i t\u00ean mi\u1ec1n c\u0169 c\u1ee7a b\u1ea1n tr\u00ean localhost, v\u00ed d\u1ee5 c\u1ee7a m\u00ecnh l\u00e0 thachpham.local. \u1ede ph\u1ea7n\u00a0 Replace with, b\u1ea1n nh\u1eadp chu\u1ed7i k\u00fd t\u1ef1 c\u1ea7n thay th\u1ebf, t\u1ee9c l\u00e0 t\u00ean mi\u1ec1n s\u1eed d\u1ee5ng ch\u00ednh th\u1ee9c cho website, v\u00ed d\u1ee5 c\u1ee7a m\u00ecnh l\u00e0 thachpham.tv. \u1ede ph\u1ea7n table, b\u1ea1n \u1ea5n Ctrl + A \u0111\u1ec3 ch\u1ecdn t\u1ea5t c\u1ea3 table trong database, b\u1ecf ch\u1ecdn ph\u1ea7n Run as dry run, cu\u1ed1i c\u00f9ng \u1ea5n Run.<\/p>\n<p><a href=\"https:\/\/thachpham.com\/wp-content\/uploads\/2013\/01\/better-search-replace-chuyen-host.jpg\" data-rel=\"penci-gallery-image-content\" data-wpel-link=\"internal\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-25255\" src=\"https:\/\/thachpham.com\/wp-content\/uploads\/2013\/01\/better-search-replace-chuyen-host.jpg\" alt=\"better-search-replace-chuyen-host\" width=\"944\" height=\"494\" \/><\/a><\/p>\n<p>Ho\u00e0n t\u1ea5t.<\/p>\n<p><a href=\"https:\/\/thachpham.com\/wp-content\/uploads\/2015\/01\/localhost-to-host-finish.jpg\" data-rel=\"penci-gallery-image-content\" data-wpel-link=\"internal\"><img loading=\"lazy\" decoding=\"async\" title=\"localhost-to-host-finish\" src=\"https:\/\/thachpham.com\/wp-content\/uploads\/2015\/01\/localhost-to-host-finish_thumb.jpg\" alt=\"localhost-to-host-finish\" width=\"850\" height=\"577\" border=\"0\" \/><\/a><\/p>\n<h3 id=\"ftoc-heading-8\" class=\"ftwp-heading\">S\u1eed d\u1ee5ng plugin \u0111\u1ec3 chuy\u1ec3n<\/h3>\n<p>N\u1ebfu b\u1ea1n \u0111\u00e3 bi\u1ebft c\u00e1ch l\u00e0m th\u1ee7 c\u00f4ng nh\u01b0 \u1edf tr\u00ean r\u1ed3i v\u00e0 c\u1ea7n t\u00ecm m\u1ed9t plugin \u0111\u1ec3 h\u1ed7 tr\u1ee3 chuy\u1ec3n website WordPress t\u1eeb localhost l\u00ean host nhanh h\u01a1n, th\u00ec b\u1ea1n c\u00f3 th\u1ec3 xem b\u00e0i h\u01b0\u1edbng d\u1eabn chuy\u1ec3n host v\u1edbi Duplicator.<\/p>\n<p>V\u1edbi plugin n\u00e0y, b\u1ea1n ch\u1ec9 c\u1ea7n l\u00e0m v\u00e0i b\u01b0\u1edbc l\u00e0 website \u0111\u00e3 c\u00f3 m\u1eb7t tr\u00ean host m\u00e0 kh\u00f4ng c\u1ea7n c\u1eadp nh\u1eadt l\u1ea1i t\u00ean mi\u1ec1n.<\/p>\n<p>L\u01b0u \u00fd r\u1eb1ng\u00a0kh\u00f4ng ph\u1ea3i host n\u00e0o c\u0169ng c\u00f3 th\u1ec3 s\u1eed d\u1ee5ng Duplicator nh\u1eefng\u00a0<a href=\"https:\/\/thachpham.com\/hosting\" data-wpel-link=\"internal\">c\u00e1c host t\u1ed1t nh\u1ea5t<\/a>\u00a0m\u00ecnh c\u00f3 gi\u1edbi thi\u1ec7u \u0111\u1ec1u c\u00f3 th\u1ec3 d\u00f9ng t\u1ed1t plugin n\u00e0y.<\/p>\n<h3 id=\"ftoc-heading-9\" class=\"ftwp-heading\">L\u1eddi k\u1ebft<\/h3>\n<p>Nh\u01b0 v\u1eady l\u00e0 website c\u1ee7a b\u1ea1n b\u00e2y gi\u1edd \u0111\u00e3 l\u00e0m m\u1ed9t chuy\u1ebfn du l\u1ecbch t\u1eeb localhost l\u00ean host \u0111\u1ec3 \u201cc\u00f9ng ra bi\u1ec3n l\u1edbn\u201d r\u1ed3i \u0111\u00f3, b\u1ea1n \u0111\u00e3 c\u00f3 th\u1ec3 b\u1eaft \u0111\u1ea7u ph\u00e1t tri\u1ec3n website m\u00ecnh m\u1ed9t c\u00e1ch ch\u00ednh th\u1ee9c v\u00e0 chuy\u1ec3n qua ph\u1ea7n ki\u1ebfn th\u1ee9c qu\u1ea3n tr\u1ecb website WordPress \u0111\u1ec3 t\u00ecm hi\u1ec3u v\u1ec1 c\u00e1c v\u1ea5n \u0111\u1ec1 m\u00e0 m\u1ed9t webmaster c\u1ea7n n\u1eafm \u0111\u1ec3 c\u00f3 th\u1ec3 qu\u1ea3n tr\u1ecb website c\u1ee7a m\u00ecnh.<\/p>\n<p>C\u00f2n n\u1ebfu b\u1ea1n mu\u1ed1n bi\u1ebft c\u00e1ch c\u00e0i \u0111\u1eb7t m\u1edbi m\u1ed9t website WordPress tr\u1ef1c ti\u1ebfp tr\u00ean host th\u00ec h\u00e3y xem b\u00e0i h\u01b0\u1edbng d\u1eabn ti\u1ebfp theo c\u1ee7a ph\u1ea7n n\u00e0y.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>CHUY\u1ec2N WORDPRESS T\u1eea LOCALHOST L\u00caN HOST TH\u1ee6 C\u00d4NG &nbsp; Sau nhi\u1ec1u b\u00e0i h\u01b0\u1edbng d\u1eabn ch\u1eafc b\u1ea1n c\u0169ng c\u00f3 ch\u00fat m\u1ec7t [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[15],"tags":[],"class_list":["post-421","post","type-post","status-publish","format-standard","hentry","category-uncategories"],"_links":{"self":[{"href":"https:\/\/kb.lagonet.vn\/index.php?rest_route=\/wp\/v2\/posts\/421","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kb.lagonet.vn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kb.lagonet.vn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kb.lagonet.vn\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kb.lagonet.vn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=421"}],"version-history":[{"count":0,"href":"https:\/\/kb.lagonet.vn\/index.php?rest_route=\/wp\/v2\/posts\/421\/revisions"}],"wp:attachment":[{"href":"https:\/\/kb.lagonet.vn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=421"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kb.lagonet.vn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=421"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kb.lagonet.vn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=421"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}