{"id":29920,"date":"2021-01-18T02:33:14","date_gmt":"2021-01-17T18:33:14","guid":{"rendered":"https:\/\/web.mwwsb.com.my\/pjci\/?post_type=kb&#038;p=29920"},"modified":"2022-09-08T21:25:12","modified_gmt":"2022-09-08T13:25:12","slug":"how-to-configure-wordpress-to-work-with-a-new-domain","status":"publish","type":"kb","link":"https:\/\/www.casbay.com\/guide\/kb\/how-to-configure-wordpress-to-work-with-a-new-domain","title":{"rendered":"HOW TO: Configure WordPress to work with a new domain"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-post\" data-elementor-id=\"29920\" class=\"elementor elementor-29920\" data-elementor-post-type=\"kb\">\n\t\t\t\t\t\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-f8000e2 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"f8000e2\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-eaa8df8\" data-id=\"eaa8df8\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t\t\t<div class=\"elementor-element elementor-element-3076721 elementor-widget elementor-widget-heading\" data-id=\"3076721\" data-element_type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">HOW TO: Cofigure WordPress to work with a new domain<\/h2>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-1e2478a elementor-widget elementor-widget-heading\" data-id=\"1e2478a\" data-element_type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t<h3 class=\"elementor-heading-title elementor-size-default\">Using WordPress Admin Dashboard<\/h3>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-17a3c4b elementor-widget elementor-widget-text-editor\" data-id=\"17a3c4b\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\tFirst, go to <b>Settings > General<\/b> and replace your <b>WordPress Address<\/b> and <b>Site Address<\/b> with your new domain name.<br><br>\n<li>The \u201cSite Address (URL)\u201d setting is the address that your visitor need to type in their browser to reach your WordPress blog.<\/li><br>\n<li>The \u201cWordPress Address (URL)\u201d setting is the address where your WordPress core files located.<\/li>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-dbc1a5e elementor-widget elementor-widget-image\" data-id=\"dbc1a5e\" data-element_type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<img fetchpriority=\"high\" decoding=\"async\" width=\"1024\" height=\"615\" src=\"https:\/\/www.casbay.com\/guide\/wp-content\/uploads\/2021\/02\/WP-change-domain-Using-the-WP-Dashboard.png\" class=\"attachment-large size-large wp-image-32467\" alt=\"HOW TO: Configure WordPress to work with a new domain\" srcset=\"https:\/\/www.casbay.com\/guide\/wp-content\/uploads\/2021\/02\/WP-change-domain-Using-the-WP-Dashboard.png 1024w, https:\/\/www.casbay.com\/guide\/wp-content\/uploads\/2021\/02\/WP-change-domain-Using-the-WP-Dashboard-300x180.png 300w, https:\/\/www.casbay.com\/guide\/wp-content\/uploads\/2021\/02\/WP-change-domain-Using-the-WP-Dashboard-768x461.png 768w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-a5ff4c4 elementor-widget elementor-widget-heading\" data-id=\"a5ff4c4\" data-element_type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t<h3 class=\"elementor-heading-title elementor-size-default\">Using File Transfer Protocol (FTP)<\/h3>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-fbe517c elementor-widget elementor-widget-text-editor\" data-id=\"fbe517c\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\tIf you have FTP access to the website, you can get your site back up and running quickly with <b>wp-config.php<\/b> and <b>functions.php<\/b> if you changed those values incorrectly in the WordPress Dashboard.\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-a5b7b21 elementor-widget elementor-widget-heading\" data-id=\"a5b7b21\" data-element_type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t<h3 class=\"elementor-heading-title elementor-size-medium\">Edit wp-config.php<\/h3>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-0e26ad8 elementor-widget elementor-widget-text-editor\" data-id=\"0e26ad8\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\tYou can set the URL for your site manually in the wp-config.php file.\n<br><br>\nAdd these lines to your wp-config.php, where \u201cexample.com\u201d is the correct location of your site.\n<br><br>\n<code><b>define('WP_HOME','http:\/\/example.com');<\/b><\/code>\n<br>\n\n<code><b>define('WP_SITEURL','http:\/\/example.com');<\/b><\/code>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-e789168 elementor-widget elementor-widget-text-editor\" data-id=\"e789168\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t**This is not necessarily the best fix, it\u2019s just hardcoding the values into the source code of the site. When using this method, you won\u2019t be able to edit them on the general settings page anymore.\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-5cb8d12 elementor-widget elementor-widget-heading\" data-id=\"5cb8d12\" data-element_type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t<h3 class=\"elementor-heading-title elementor-size-medium\">Edit functions.php<\/h3>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-739803b elementor-widget elementor-widget-text-editor\" data-id=\"739803b\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<ol>\n \t<li>Download a copy of the active theme\u2019s functions.php file. You can edit it in a simple text editor and reupload to the site.<\/li><br>\n \t<li>Add these lines to the file, right after the initial &#8220;&lt;?php&#8221; line. \n\n<br><br><code><b>update_option( 'siteurl', 'http:\/\/example.com' );<\/b><\/code>\n<br><code><b>\nupdate_option( 'home', 'http:\/\/example.com' );<\/b><\/code>\n<br><br>\n*Remember to replace the example.com with your own URL .<\/li>\n<\/ol>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-0cfbfed elementor-widget elementor-widget-image\" data-id=\"0cfbfed\" data-element_type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<img decoding=\"async\" src=\"https:\/\/casbay.com\/guide\/wp-content\/uploads\/2021\/02\/functions.php_.png\" title=\"\" alt=\"\" loading=\"lazy\" \/>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-40b0399 elementor-widget elementor-widget-text-editor\" data-id=\"40b0399\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t3. Re-upload the file to your site in the same location.\n<br><br>\n4. Load the login or admin page for a few times. The site is supposed to return.\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-24539db elementor-widget elementor-widget-text-editor\" data-id=\"24539db\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\tRead the next article: <a href=\"https:\/\/www.casbay.com\/guide\/kb\/how-to-change-your-header-in-wordpress\/\">How to Change your Header in WordPress<\/a>.\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>HOW TO: Cofigure WordPress to work with a new domain Using WordPress Admin Dashboard First, go to Settings > General and replace your WordPress Address and Site Address with your new domain name. The \u201cSite Address (URL)\u201d setting is the address that your visitor need to type in their browser to reach your WordPress blog. [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"site-sidebar-layout":"no-sidebar","site-content-layout":"page-builder","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":"disabled","ast-breadcrumbs-content":"","ast-featured-img":"disabled","footer-sml-layout":"","theme-transparent-header-meta":"default","adv-header-id-meta":"","stick-header-meta":"default","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":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","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-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-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-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-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-gradient":""}}},"kbtopic":[43],"kbtag":[106],"mkb_version":[],"_links":{"self":[{"href":"https:\/\/www.casbay.com\/guide\/wp-json\/wp\/v2\/kb\/29920"}],"collection":[{"href":"https:\/\/www.casbay.com\/guide\/wp-json\/wp\/v2\/kb"}],"about":[{"href":"https:\/\/www.casbay.com\/guide\/wp-json\/wp\/v2\/types\/kb"}],"author":[{"embeddable":true,"href":"https:\/\/www.casbay.com\/guide\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.casbay.com\/guide\/wp-json\/wp\/v2\/comments?post=29920"}],"version-history":[{"count":19,"href":"https:\/\/www.casbay.com\/guide\/wp-json\/wp\/v2\/kb\/29920\/revisions"}],"predecessor-version":[{"id":37353,"href":"https:\/\/www.casbay.com\/guide\/wp-json\/wp\/v2\/kb\/29920\/revisions\/37353"}],"wp:attachment":[{"href":"https:\/\/www.casbay.com\/guide\/wp-json\/wp\/v2\/media?parent=29920"}],"wp:term":[{"taxonomy":"kbtopic","embeddable":true,"href":"https:\/\/www.casbay.com\/guide\/wp-json\/wp\/v2\/kbtopic?post=29920"},{"taxonomy":"kbtag","embeddable":true,"href":"https:\/\/www.casbay.com\/guide\/wp-json\/wp\/v2\/kbtag?post=29920"},{"taxonomy":"mkb_version","embeddable":true,"href":"https:\/\/www.casbay.com\/guide\/wp-json\/wp\/v2\/mkb_version?post=29920"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}