softmaji-header-wbg-min
softmaji-header-wbg-min
softmaji-blue-header-min
softmaji-blue-header-min
  • Home
  • Services
    • Website Designing
      • Responsive Website Design
      • Static Website Design
      • Website Redesign
      • Landing Page Design
    • Website Development
      • PHP Website Development
      • WordPress Website Development
      • Ecommerce Website Development
      • Custom Website Development
    • Digital Marketing
      • Google Adwords/PPC
      • Facebook Promotion
    • SEO Service
  • Trainings
    • Learn Web Development
    • Learn Graphics Design
    • Learn Business Communication Skills
  • Pricing
  • Portfolio
  • Events
  • Offers
  • Contact Us

Configure WordPress with a New Domain in Easy Steps for Better Working

HomeConfigure WordPress with a New Domain in Easy Steps for Better Working

Offer Expire Soon..


Only New User..


Let’s assume you were using abc.com domain for your blog and later you decide to change it to xyz.com. Because of reasons like low traffic, not related to your niche, already purchased by someone but the extension is different, domain is blacklisted but after buying you came to know, etc.

So, you might get stuck how to replace the old domain name with the new domain name. Not to worry, if you are planning to use WordPress on a new domain then you need to follow a few steps for the smooth working of your new domain in WordPress. Those steps are mentioned below:

Table of Contents

Toggle
  • First Step: Using the WordPress Dashboard
  • Second Step: Via FTP
  • Edit wp-config.php
  • Edit functions.php
  • Third Step: Using phpMyAdmin

First Step: Using the WordPress Dashboard

Being a WordPress site owner, this step is easy for you to follow and implement. Go to setting > General and replace WordPress Address and Site Address with the new domain that you want to utilize for your WordPress website.

• The “Site Address (URL)” in the setting is the address that you want people to type or browse to land on your WordPress blog.

• The “Site Address (URL)” in the setting is the address that comprises of WordPress core files reside.

Second Step: Via FTP

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.

Edit wp-config.php

You can also place the site URL manually in the wp-config.php file.

To follow the same insert these two lines to your wp-config.php, where “yourdomainname” is the right location of your WordPress site.

define('WP_HOME','http://yourdomainname.com');
define('WP_SITEURL','http://yourdomainname.com');

This may not be the best fix because it’s a hardcoding of the values into the website source code and you can’t do the same in the general settings page.

Edit functions.php

1. You need to download a copy of the active theme’s function.php file. Edit that downloaded a copy in a simple text editor and upload that edited copy again on the website.

2. Insert these two lines to the file, next after the initial “<?php” line.

update_option( 'siteurl', 'http://yourdomainname.com' );

update_option( 'home', 'http://yourdomainname.com' );

3. Upload the edited file again on the website without changing the location.

4. Refresh the login or admin page multiple times, to get the same site again with the backup.

Note:

i) Don’t leave those lines in the function.php file. Remove the lines once the site is live.

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.

Third Step: Using phpMyAdmin

You are required to change the website URL and home options in your WordPress database. You can do this into the cPanel > phpMyAdmin.

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.

Last but not least don’t forgot to clear the cache of your browser and check whether your website is working or not.

Faizan Khan
23
Latest News
Prev PostHow Do I Import/Export My WordPress Gutenberg Blocks?May 14, 2024
Next PostHow To Restore WordPress Backup With Softaculous?May 14, 2024

Related items

otpless-issue
Latest News

OTPLess Not Working? Here’s What Happened!

Imagine this: You run a business, and suddenly, your customers can’t log in to your websit

SoftMaji InfoTech
20/06/2025
8
Latest News

How To Install WordPress Blog?

Let’s see how to install WordPress blog on your WordPress hosting account. Let’s

Faizan Khan
14/05/2024
149
Latest News

How to Install a Theme in WordPress?

Steps to install a theme in WordPress: Log in to WordPress. Navigate to Appearance and cli

Faizan Khan
14/05/2024
135
softmaji-header-wbg-min
SoftMaji is one of the affordable web development company in the web development industry. You don’t have to go searching anywhere for finding a reliable web development partner because we have crafted web development solutions that can fill the void left by others in the market.
Services
  • News Portal Development
  • Custom Website Development
  • PHP Website Development
  • Ecommerce Website Development
  • WordPress Website Development
Shortlinks
  • Blog
  • Offers
  • Events
  • Pricing
  • Reviews
  • Portfolio
  • Our Team
  • Payment Options
  • Explore Packages
Company
  • FAQ
  • Careers
  • Sitemap
  • Feedback
  • About Us
  • Contact Us
  • Privacy Policy
  • Terms & Conditions
  • Refund And Cancellation
Contact Us
4/40 Vipul Khand , Gomti Nagar Lucknow
Uttar Pradesh 226010
Landline - +915223162418
Email - hello@softmaji.in
Office Time Mon - Sat
(10:00AM - 5:00PM)
Sunday Close
+91 9795405324
Lucknow , Uttar Pradesh
Copyright © 2022. All Rights Reserved.