{"id":7637,"date":"2020-06-08T11:46:49","date_gmt":"2020-06-08T11:46:49","guid":{"rendered":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/?p=7637"},"modified":"2020-06-08T11:46:49","modified_gmt":"2020-06-08T11:46:49","slug":"learn-how-to-configure-wordpress-to-work-with-a-new-domain","status":"publish","type":"post","link":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/learn-how-to-configure-wordpress-to-work-with-a-new-domain\/","title":{"rendered":"Learn how to configure WordPress to work with a new domain?"},"content":{"rendered":"<p>In this article, we will see a few methods to change the domain name on your WordPress application.<\/p>\n<h3>Method 1 : Using phpMyAdmin<\/h3>\n<p>You need to change the <strong>siteurl<\/strong> and <strong>home<\/strong> options in your WordPress database. It can be done using the phpMyAdmin tool available in your cPanel.<\/p>\n<p>On the <strong>phpMyAdmin<\/strong> dashboard, select your <strong>WordPress database<\/strong> and locate <strong>table wp_options<\/strong>.<\/p>\n<p>Identify the <strong>siteurl<\/strong> and <strong>home<\/strong> options and change their values to the new domain that you want to use.<\/p>\n<p>Remember to clear the cache of your browser and to verify if the website is still functional.<\/p>\n<h3>Method 2: Using the WordPress Admin Dashboard<\/h3>\n<p>Login to your <strong>WordPress Dashboard<\/strong> (e.g.\u00a0<em>http:\/\/your_domain.com\/wp-admin<\/em>).<\/p>\n<p>Go to <strong>Settings -&gt; General<\/strong>.<\/p>\n<p>Under the <strong>WordPress address (URL)<\/strong> and the <strong>Site address (URL)<\/strong> sections, enter the domain that you want your applications to work with. Save these changes.<\/p>\n<p>Using the same modifications you can also add &#8220;www&#8221; to your domain.<\/p>\n<h3>Method 3: Using WP-CLI over SSH<\/h3>\n<p>MilesWeb customers can take benefits from <strong>WP-CLI<\/strong> ( WordPress Command Line Interface). At MilesWeb hosting you get WP-CLI installed by default on their hosting accounts.<\/p>\n<p>Now connect to your hosting server through SSH, go to your WordPress installation folder, and then execute the following commands :<\/p>\n<pre class=\"trim-whitespace:false lang:default decode:true \">wp db export<\/pre>\n<p>This command creates a backup of your database into an SQL file.<\/p>\n<p>Now execute the following command :<\/p>\n<pre class=\"trim-whitespace:false lang:default decode:true \">wp search-replace 'http:\/\/olddomain.com' 'http:\/\/newdomain.com'<\/pre>\n<p>The above search-replace command will replace all occurrences of\u00a0<em>http:\/\/olddomain.com<\/em>\u00a0with\u00a0<em>http:\/\/newdomain.com\u00a0<\/em>in your database application.<\/p>\n<p>Note here\u00a0<strong><em>http:\/\/olddomain.com\u00a0<\/em><\/strong>is your current WordPress configured domain and\u00a0<strong><em>http:\/\/newdomain.com<\/em><\/strong>\u00a0is the new domain that you want to use.<\/p>\n<p>Now execute the last command show below :<\/p>\n<pre class=\"trim-whitespace:false lang:default decode:true \">wp cache flush<\/pre>\n<p>The command will allow you to flush the object cache of your WordPress.<\/p>\n<p>That&#8217;s it.<\/p>\n<p><strong>Also Read :<\/strong><\/p>\n<p><a href=\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/move-wordpress-local-server-to-live-site\/\" target=\"_blank\" rel=\"noopener\"><strong>Learn to Move WordPress from Local Server to Live Site Using Plugin.<\/strong><\/a><\/p>\n<p><a href=\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/group-block-in-wordpress\/\" target=\"_blank\" rel=\"noopener\"><strong>Learn to Use the Group Block in WordPress.<\/strong><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this article, we will see a few methods to change the domain name on your WordPress application. Method 1 : Using phpMyAdmin You need to change the siteurl and home options in your WordPress database. It can be done using the phpMyAdmin tool available in your cPanel. On the phpMyAdmin dashboard, select your WordPress [&hellip;]<\/p>\n","protected":false},"author":18,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[17],"tags":[1459,1460,78],"class_list":["post-7637","post","type-post","status-publish","format-standard","placeholder-for-hentry","category-wordpress-faq","tag-configure-wordpress","tag-new-domain-to-wordpress","tag-wordpress-2"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.2 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Learn how to configure WordPress to work with a new domain? - Web Hosting FAQs by MilesWeb<\/title>\n<meta name=\"description\" content=\"This article conatins three methods to configure WordPress to work with a new domain.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/learn-how-to-configure-wordpress-to-work-with-a-new-domain\/\" \/>\n<meta property=\"og:locale\" content=\"en_GB\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Learn how to configure WordPress to work with a new domain? - Web Hosting FAQs by MilesWeb\" \/>\n<meta property=\"og:description\" content=\"This article conatins three methods to configure WordPress to work with a new domain.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/learn-how-to-configure-wordpress-to-work-with-a-new-domain\/\" \/>\n<meta property=\"og:site_name\" content=\"Web Hosting FAQs by MilesWeb\" \/>\n<meta property=\"article:published_time\" content=\"2020-06-08T11:46:49+00:00\" \/>\n<meta name=\"author\" content=\"Sonam Wagh\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Sonam Wagh\" \/>\n\t<meta name=\"twitter:label2\" content=\"Estimated reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/learn-how-to-configure-wordpress-to-work-with-a-new-domain\/\",\"url\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/learn-how-to-configure-wordpress-to-work-with-a-new-domain\/\",\"name\":\"Learn how to configure WordPress to work with a new domain? - Web Hosting FAQs by MilesWeb\",\"isPartOf\":{\"@id\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#website\"},\"datePublished\":\"2020-06-08T11:46:49+00:00\",\"author\":{\"@id\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#\/schema\/person\/dc645d02823c86e07e53798ebe02c6f4\"},\"description\":\"This article conatins three methods to configure WordPress to work with a new domain.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/learn-how-to-configure-wordpress-to-work-with-a-new-domain\/#breadcrumb\"},\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/learn-how-to-configure-wordpress-to-work-with-a-new-domain\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/learn-how-to-configure-wordpress-to-work-with-a-new-domain\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Learn how to configure WordPress to work with a new domain?\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#website\",\"url\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/\",\"name\":\"Web Hosting FAQs by MilesWeb\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-GB\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#\/schema\/person\/dc645d02823c86e07e53798ebe02c6f4\",\"name\":\"Sonam Wagh\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/9cb2cf6ae11d7625ef6417ef8e84ba25?s=96&d=blank&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/9cb2cf6ae11d7625ef6417ef8e84ba25?s=96&d=blank&r=g\",\"caption\":\"Sonam Wagh\"},\"description\":\"With an interest in doing something creative daily, Sonam works as a Digital Marketing Executive. She likes to write technical blogs related to web hosting, digital marketing, and other IT topics. She also likes to spend her leisure time on social media to find different strategies for client engagement.\",\"url\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/author\/sonam\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Learn how to configure WordPress to work with a new domain? - Web Hosting FAQs by MilesWeb","description":"This article conatins three methods to configure WordPress to work with a new domain.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/learn-how-to-configure-wordpress-to-work-with-a-new-domain\/","og_locale":"en_GB","og_type":"article","og_title":"Learn how to configure WordPress to work with a new domain? - Web Hosting FAQs by MilesWeb","og_description":"This article conatins three methods to configure WordPress to work with a new domain.","og_url":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/learn-how-to-configure-wordpress-to-work-with-a-new-domain\/","og_site_name":"Web Hosting FAQs by MilesWeb","article_published_time":"2020-06-08T11:46:49+00:00","author":"Sonam Wagh","twitter_misc":{"Written by":"Sonam Wagh","Estimated reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/learn-how-to-configure-wordpress-to-work-with-a-new-domain\/","url":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/learn-how-to-configure-wordpress-to-work-with-a-new-domain\/","name":"Learn how to configure WordPress to work with a new domain? - Web Hosting FAQs by MilesWeb","isPartOf":{"@id":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#website"},"datePublished":"2020-06-08T11:46:49+00:00","author":{"@id":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#\/schema\/person\/dc645d02823c86e07e53798ebe02c6f4"},"description":"This article conatins three methods to configure WordPress to work with a new domain.","breadcrumb":{"@id":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/learn-how-to-configure-wordpress-to-work-with-a-new-domain\/#breadcrumb"},"inLanguage":"en-GB","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.milesweb.co.uk\/hosting-faqs\/learn-how-to-configure-wordpress-to-work-with-a-new-domain\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/learn-how-to-configure-wordpress-to-work-with-a-new-domain\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/"},{"@type":"ListItem","position":2,"name":"Learn how to configure WordPress to work with a new domain?"}]},{"@type":"WebSite","@id":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#website","url":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/","name":"Web Hosting FAQs by MilesWeb","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-GB"},{"@type":"Person","@id":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#\/schema\/person\/dc645d02823c86e07e53798ebe02c6f4","name":"Sonam Wagh","image":{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/9cb2cf6ae11d7625ef6417ef8e84ba25?s=96&d=blank&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/9cb2cf6ae11d7625ef6417ef8e84ba25?s=96&d=blank&r=g","caption":"Sonam Wagh"},"description":"With an interest in doing something creative daily, Sonam works as a Digital Marketing Executive. She likes to write technical blogs related to web hosting, digital marketing, and other IT topics. She also likes to spend her leisure time on social media to find different strategies for client engagement.","url":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/author\/sonam\/"}]}},"views":449,"_links":{"self":[{"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/posts\/7637","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/users\/18"}],"replies":[{"embeddable":true,"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/comments?post=7637"}],"version-history":[{"count":1,"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/posts\/7637\/revisions"}],"predecessor-version":[{"id":7638,"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/posts\/7637\/revisions\/7638"}],"wp:attachment":[{"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/media?parent=7637"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/categories?post=7637"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/tags?post=7637"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}