{"id":11406,"date":"2024-05-02T18:45:41","date_gmt":"2024-05-02T18:45:41","guid":{"rendered":"https:\/\/hostvento.com\/kb\/web-hosting\/getting-started-guide\/shared-hosting-quick-start-guide\/managed-wordpress-quick-start-guide\/configure-wordpress-with-a-new-domain-in-easy-steps-for-better-working\/"},"modified":"2024-06-16T16:53:14","modified_gmt":"2024-06-16T16:53:14","slug":"configure-wordpress-with-a-new-domain-in-easy-steps-for-better-working","status":"publish","type":"docs","link":"https:\/\/www.hostvento.com\/kb\/docs\/hosting-faqs\/configure-wordpress-with-a-new-domain-in-easy-steps-for-better-working\/","title":{"rendered":"Configure WordPress with a New Domain in Easy Steps for Better Working"},"content":{"rendered":"\n<p>Assume for the moment that you choose to switch your blog&#8217;s domain name from abc.com to xyz.com. due to factors such as poor traffic, unrelated to your niche, previously owned by someone else but with a different extension, domain being blocked but you learned about it after purchasing, etc.<\/p>\n\n\n\n<p>Therefore, you can run into trouble trying to use the new domain name in place of the old one. Do not panic; there are a few procedures you must take to ensure WordPress operates properly on your new domain if you intend to use it on it. These actions are listed as follows:<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>First Step: Using the WordPress Dashboard<\/strong><\/h3>\n\n\n\n<p>Being a WordPress site owner, this step is easy for you to follow and implement. Go to setting &gt; General and replace WordPress Address and Site Address with the new domain that you want to utilize for your WordPress website.<\/p>\n\n\n\n<p>\u2022 The \u201cSite Address (URL)\u201d in the setting is the address that you want people to type or browse to land on your WordPress blog.<\/p>\n\n\n\n<p>\u2022 The \u201cSite Address (URL)\u201d in the setting is the address that comprises of WordPress core files reside.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><a href=\"https:\/\/www.hostvento.com\/kb\/hosting-faqs\/wp-content\/uploads\/2019\/01\/using-WordPress-dashboard-3.png\"><\/a><\/h3>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Second Step: Via FTP<\/strong><\/h3>\n\n\n\n<p>You can also add the new domain in your WordPress site via FTP. This method is useful, if you have the right to access your website via FTP. Moreover, this will easily help you to get a website back up and run the same, if values are entered incorrectly in the dashboard.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Edit wp-config.php<\/strong><\/h3>\n\n\n\n<p>You can also place the site URL manually in the wp-config.php file.<\/p>\n\n\n\n<p>To follow the same insert these two lines to your wp-config.php, where \u201cyourdomainname\u201d is the right location of your WordPress site.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">define('WP_HOME','http:\/\/yourdomainname.com');<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">define('WP_SITEURL','http:\/\/yourdomainname.com');<\/pre>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><a href=\"https:\/\/www.hostvento.com\/kb\/hosting-faqs\/wp-content\/uploads\/2019\/01\/VIA-FTP.png\"><img decoding=\"async\" src=\"https:\/\/www.hostvento.com\/kb\/hosting-faqs\/wp-content\/uploads\/2019\/06\/SSL3-min.png\" alt=\"\" class=\"wp-image-6312\"\/><\/a><\/figure>\n<\/div>\n\n\n<p>This may not be the best fix because it\u2019s a hardcoding of the values into the website source code and you can\u2019t do the same in the general settings page.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Edit functions.php<\/strong><\/h3>\n\n\n\n<p>1. You need to download a copy of the active theme\u2019s function.php file. Edit that downloaded a copy in a simple text editor and upload that edited copy again on the website.<\/p>\n\n\n\n<p>2. Insert these two lines to the file, next after the initial \u201c&lt;?php\u201d line.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">update_option( 'siteurl', 'http:\/\/yourdomainname.com' );\n\n<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">update_option( 'home', 'http:\/\/yourdomainname.com' );<\/pre>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><a href=\"https:\/\/www.hostvento.com\/kb\/hosting-faqs\/wp-content\/uploads\/2019\/01\/via-ftp.png\"><img decoding=\"async\" src=\"https:\/\/www.hostvento.com\/kb\/hosting-faqs\/wp-content\/uploads\/2019\/01\/via-ftp-300x118.png\" alt=\"via-ftp\" class=\"wp-image-15273\"\/><\/a><\/figure>\n<\/div>\n\n\n<p>3. Upload the edited file again on the website without changing the location.<\/p>\n\n\n\n<p>4. Refresh the login or admin page multiple times, to get the same site again with the backup.<\/p>\n\n\n\n<p><strong>Note:<\/strong><\/p>\n\n\n\n<p>i) Don\u2019t leave those lines in the function.php file. Remove the lines once the site is live.<\/p>\n\n\n\n<p>ii) In case, your theme is not supporting a function.php file then you can create a new file known as function.php in a text editor and implement the above-mentioned steps.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Third Step: Using phpMyAdmin<\/strong><\/h3>\n\n\n\n<p>You are required to change the website URL and home options in your WordPress database. You can do this into the cPanel &gt; phpMyAdmin.<\/p>\n\n\n\n<p>In phpMyAdmin, choose your WordPress database and browse the table wp_options. Search the alternatives siteurl and home and replace their values to the new domain that you want to display publicly.<\/p>\n\n\n\n<p>Finally, but just as importantly, remember to empty your browser&#8217;s cache and see if your website is operational.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Assume for the moment that you choose to switch your blog&#8217;s domain name from abc.com to xyz.com. due to factors such as poor traffic, unrelated to your niche, previously owned by someone else but with a different extension, domain being blocked but you learned about it after purchasing, etc. Therefore, you can run into trouble [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":23377,"menu_order":163,"comment_status":"closed","ping_status":"closed","template":"","doc_tag":[],"class_list":["post-11406","docs","type-docs","status-publish","hentry","no-post-thumbnail"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.hostvento.com\/kb\/wp-json\/wp\/v2\/docs\/11406","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hostvento.com\/kb\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/www.hostvento.com\/kb\/wp-json\/wp\/v2\/types\/docs"}],"author":[{"embeddable":true,"href":"https:\/\/www.hostvento.com\/kb\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hostvento.com\/kb\/wp-json\/wp\/v2\/comments?post=11406"}],"version-history":[{"count":2,"href":"https:\/\/www.hostvento.com\/kb\/wp-json\/wp\/v2\/docs\/11406\/revisions"}],"predecessor-version":[{"id":11409,"href":"https:\/\/www.hostvento.com\/kb\/wp-json\/wp\/v2\/docs\/11406\/revisions\/11409"}],"up":[{"embeddable":true,"href":"https:\/\/www.hostvento.com\/kb\/wp-json\/wp\/v2\/docs\/23377"}],"wp:attachment":[{"href":"https:\/\/www.hostvento.com\/kb\/wp-json\/wp\/v2\/media?parent=11406"}],"wp:term":[{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/www.hostvento.com\/kb\/wp-json\/wp\/v2\/doc_tag?post=11406"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}