{"id":243,"date":"2023-02-11T07:04:00","date_gmt":"2023-02-11T07:04:00","guid":{"rendered":"https:\/\/blog.chaiyakul.com\/?p=243"},"modified":"2025-05-19T07:08:34","modified_gmt":"2025-05-19T07:08:34","slug":"change-database-wordpress","status":"publish","type":"post","link":"https:\/\/blog.chaiyakul.com\/index.php\/2023\/02\/11\/change-database-wordpress\/","title":{"rendered":"\u0e27\u0e34\u0e18\u0e35\u0e40\u0e1b\u0e25\u0e35\u0e48\u0e22\u0e19 Database \u0e02\u0e2d\u0e07 WordPress"},"content":{"rendered":"\n<p>1.<strong>\u0e40\u0e02\u0e49\u0e32\u0e44\u0e1b\u0e17\u0e35\u0e48\u0e44\u0e1f\u0e25\u0e4c <code>wp-config.php<\/code><\/strong><\/p>\n\n\n\n<p>\u0e42\u0e14\u0e22\u0e1b\u0e01\u0e15\u0e34\u0e08\u0e30\u0e2d\u0e22\u0e39\u0e48\u0e43\u0e19\u0e42\u0e1f\u0e25\u0e40\u0e14\u0e2d\u0e23\u0e4c\u0e2b\u0e25\u0e31\u0e01\u0e02\u0e2d\u0e07 WordPress \u0e17\u0e35\u0e48\u0e04\u0e38\u0e13\u0e15\u0e34\u0e14\u0e15\u0e31\u0e49\u0e07 (\u0e40\u0e0a\u0e48\u0e19 <code>public_html<\/code> \u0e2b\u0e23\u0e37\u0e2d <code>www<\/code>)<\/p>\n\n\n\n<p>2.<strong>\u0e41\u0e01\u0e49\u0e44\u0e02\u0e02\u0e49\u0e2d\u0e21\u0e39\u0e25\u0e01\u0e32\u0e23\u0e40\u0e0a\u0e37\u0e48\u0e2d\u0e21\u0e15\u0e48\u0e2d\u0e10\u0e32\u0e19\u0e02\u0e49\u0e2d\u0e21\u0e39\u0e25<\/strong><\/p>\n\n\n\n<p>\u0e2b\u0e32\u0e42\u0e04\u0e49\u0e14\u0e2a\u0e48\u0e27\u0e19\u0e19\u0e35\u0e49\u0e43\u0e19\u0e44\u0e1f\u0e25\u0e4c <code>wp-config.php<\/code>:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n\/\/ ** MySQL settings - You can get this info from your web host ** \/\/\n\/** The name of the database for WordPress *\/\ndefine(&#039;DB_NAME&#039;, &#039;\u0e0a\u0e37\u0e48\u0e2d\u0e10\u0e32\u0e19\u0e02\u0e49\u0e2d\u0e21\u0e39\u0e25\u0e40\u0e14\u0e34\u0e21&#039;);\n\n\/** MySQL database username *\/\ndefine(&#039;DB_USER&#039;, &#039;\u0e0a\u0e37\u0e48\u0e2d\u0e1c\u0e39\u0e49\u0e43\u0e0a\u0e49\u0e10\u0e32\u0e19\u0e02\u0e49\u0e2d\u0e21\u0e39\u0e25&#039;);\n\n\/** MySQL database password *\/\ndefine(&#039;DB_PASSWORD&#039;, &#039;\u0e23\u0e2b\u0e31\u0e2a\u0e1c\u0e48\u0e32\u0e19\u0e10\u0e32\u0e19\u0e02\u0e49\u0e2d\u0e21\u0e39\u0e25&#039;);\n\n\/** MySQL hostname *\/\ndefine(&#039;DB_HOST&#039;, &#039;localhost&#039;);\n<\/pre><\/div>\n\n\n<p>\u0e08\u0e32\u0e01\u0e19\u0e31\u0e49\u0e19\u0e40\u0e1b\u0e25\u0e35\u0e48\u0e22\u0e19\u0e02\u0e49\u0e2d\u0e21\u0e39\u0e25\u0e40\u0e2b\u0e25\u0e48\u0e32\u0e19\u0e35\u0e49\u0e43\u0e2b\u0e49\u0e15\u0e23\u0e07\u0e01\u0e31\u0e1a\u0e10\u0e32\u0e19\u0e02\u0e49\u0e2d\u0e21\u0e39\u0e25\u0e43\u0e2b\u0e21\u0e48\u0e17\u0e35\u0e48\u0e04\u0e38\u0e13\u0e15\u0e49\u0e2d\u0e07\u0e01\u0e32\u0e23\u0e43\u0e0a\u0e49 \u0e40\u0e0a\u0e48\u0e19<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\ndefine(&#039;DB_NAME&#039;, &#039;database_name_new&#039;);\ndefine(&#039;DB_USER&#039;, &#039;database_user_new&#039;);\ndefine(&#039;DB_PASSWORD&#039;, &#039;database_password_new&#039;);\ndefine(&#039;DB_HOST&#039;, &#039;database_host_new&#039;); \/\/ \u0e2a\u0e48\u0e27\u0e19\u0e43\u0e2b\u0e0d\u0e48\u0e08\u0e30\u0e40\u0e1b\u0e47\u0e19 localhost \u0e16\u0e49\u0e32\u0e42\u0e2e\u0e2a\u0e15\u0e4c\u0e40\u0e14\u0e35\u0e22\u0e27\u0e01\u0e31\u0e19\n<\/pre><\/div>\n\n\n<p><strong>3.\u0e1a\u0e31\u0e19\u0e17\u0e36\u0e01\u0e44\u0e1f\u0e25\u0e4c\u0e41\u0e25\u0e30\u0e2d\u0e31\u0e1b\u0e42\u0e2b\u0e25\u0e14\u0e01\u0e25\u0e31\u0e1a\u0e40\u0e0b\u0e34\u0e23\u0e4c\u0e1f\u0e40\u0e27\u0e2d\u0e23\u0e4c<\/strong><\/p>\n\n\n\n<p><strong>4.\u0e15\u0e23\u0e27\u0e08\u0e2a\u0e2d\u0e1a<\/strong><\/p>\n\n\n\n<p>\u0e40\u0e02\u0e49\u0e32\u0e40\u0e27\u0e47\u0e1a\u0e44\u0e0b\u0e15\u0e4c WordPress \u0e02\u0e2d\u0e07\u0e04\u0e38\u0e13\u0e43\u0e2b\u0e21\u0e48 \u0e2b\u0e32\u0e01\u0e01\u0e32\u0e23\u0e40\u0e0a\u0e37\u0e48\u0e2d\u0e21\u0e15\u0e48\u0e2d\u0e10\u0e32\u0e19\u0e02\u0e49\u0e2d\u0e21\u0e39\u0e25\u0e16\u0e39\u0e01\u0e15\u0e49\u0e2d\u0e07 \u0e23\u0e30\u0e1a\u0e1a\u0e08\u0e30\u0e41\u0e2a\u0e14\u0e07\u0e02\u0e49\u0e2d\u0e21\u0e39\u0e25\u0e15\u0e32\u0e21\u0e10\u0e32\u0e19\u0e02\u0e49\u0e2d\u0e21\u0e39\u0e25\u0e43\u0e2b\u0e21\u0e48<\/p>\n\n\n\n<p><span style=\"text-decoration: underline;\">\u0e2b\u0e21\u0e32\u0e22\u0e40\u0e2b\u0e15\u0e38\u0e40\u0e1e\u0e34\u0e48\u0e21\u0e40\u0e15\u0e34\u0e21<\/span><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u0e16\u0e49\u0e32\u0e04\u0e38\u0e13\u0e40\u0e1b\u0e25\u0e35\u0e48\u0e22\u0e19\u0e44\u0e1b\u0e43\u0e0a\u0e49\u0e10\u0e32\u0e19\u0e02\u0e49\u0e2d\u0e21\u0e39\u0e25\u0e43\u0e2b\u0e21\u0e48\u0e17\u0e35\u0e48\u0e22\u0e31\u0e07\u0e44\u0e21\u0e48\u0e21\u0e35\u0e02\u0e49\u0e2d\u0e21\u0e39\u0e25 WordPress \u0e04\u0e38\u0e13\u0e2d\u0e32\u0e08\u0e08\u0e30\u0e15\u0e49\u0e2d\u0e07 import \u0e02\u0e49\u0e2d\u0e21\u0e39\u0e25\u0e10\u0e32\u0e19\u0e02\u0e49\u0e2d\u0e21\u0e39\u0e25\u0e40\u0e01\u0e48\u0e32\u0e44\u0e1b\u0e22\u0e31\u0e07\u0e10\u0e32\u0e19\u0e02\u0e49\u0e2d\u0e21\u0e39\u0e25\u0e43\u0e2b\u0e21\u0e48\u0e01\u0e48\u0e2d\u0e19 (\u0e40\u0e0a\u0e48\u0e19 \u0e43\u0e0a\u0e49 phpMyAdmin Export\/Import)<\/li>\n\n\n\n<li>\u0e04\u0e27\u0e23\u0e2a\u0e33\u0e23\u0e2d\u0e07\u0e02\u0e49\u0e2d\u0e21\u0e39\u0e25\u0e10\u0e32\u0e19\u0e02\u0e49\u0e2d\u0e21\u0e39\u0e25\u0e41\u0e25\u0e30\u0e44\u0e1f\u0e25\u0e4c <code>wp-config.php<\/code> \u0e01\u0e48\u0e2d\u0e19\u0e17\u0e33\u0e01\u0e32\u0e23\u0e40\u0e1b\u0e25\u0e35\u0e48\u0e22\u0e19\u0e41\u0e1b\u0e25\u0e07\u0e17\u0e38\u0e01\u0e04\u0e23\u0e31\u0e49\u0e07\u0e40\u0e1e\u0e37\u0e48\u0e2d\u0e1b\u0e49\u0e2d\u0e07\u0e01\u0e31\u0e19\u0e1b\u0e31\u0e0d\u0e2b\u0e32<\/li>\n<\/ul>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>1.\u0e40\u0e02\u0e49\u0e32\u0e44\u0e1b\u0e17\u0e35\u0e48\u0e44\u0e1f\u0e25\u0e4c wp-config.php \u0e42\u0e14\u0e22\u0e1b\u0e01\u0e15\u0e34\u0e08\u0e30\u0e2d\u0e22\u0e39\u0e48\u0e43\u0e19\u0e42\u0e1f\u0e25\u0e40\u0e14\u0e2d\u0e23\u0e4c\u0e2b\u0e25 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_editorskit_title_hidden":false,"_editorskit_reading_time":0,"_editorskit_is_block_options_detached":false,"_editorskit_block_options_position":"{}","footnotes":""},"categories":[116],"tags":[],"class_list":["post-243","post","type-post","status-publish","format-standard","hentry","category-wordpress"],"_links":{"self":[{"href":"https:\/\/blog.chaiyakul.com\/index.php\/wp-json\/wp\/v2\/posts\/243","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.chaiyakul.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.chaiyakul.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.chaiyakul.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.chaiyakul.com\/index.php\/wp-json\/wp\/v2\/comments?post=243"}],"version-history":[{"count":1,"href":"https:\/\/blog.chaiyakul.com\/index.php\/wp-json\/wp\/v2\/posts\/243\/revisions"}],"predecessor-version":[{"id":244,"href":"https:\/\/blog.chaiyakul.com\/index.php\/wp-json\/wp\/v2\/posts\/243\/revisions\/244"}],"wp:attachment":[{"href":"https:\/\/blog.chaiyakul.com\/index.php\/wp-json\/wp\/v2\/media?parent=243"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.chaiyakul.com\/index.php\/wp-json\/wp\/v2\/categories?post=243"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.chaiyakul.com\/index.php\/wp-json\/wp\/v2\/tags?post=243"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}