728x90

As we said, changing your WordPress website’s domain name is not something you should do lightly. However, when you do find yourself in this situation, the process involves just a few steps:

  1. Access your WordPress dashboard, and change your URL within the Settings > General screen.
  2. Update your wp-config.php file to reflect the changes.
  3. Check that the domain change has been correctly implemented.

The process itself is relatively simple, although there are some aspects that require a little technical knowledge. We’ll cover those in the next few sections, but don’t worry – we’ll walk you through each step.

Changing Your Domain in WordPress

Before you dive headfirst into changing your website’s domain name, you’ll want to keep a few considerations in mind. A little preparation is essential, to make sure the process goes as smoothly as possible. One mistake could bring down your entire website, but getting your resources and knowledge in order before you begin helps you avoid that scenario.

For instance, you’ll want to make you have a full backup of your website in place before lifting a finger. That way, if the worst happens, you can roll back your changes to a clean configuration and start over.

Also, you’ll need to use a File Transfer Protocol (FTP) client for some of these steps. This is a way to access your server directly from your desktop, and although it’s simple to use, there is a learning curve involved. As such, you’ll want to download a suitable client (we recommend FileZilla) and brush up on your FTP skills.

In addition, you’re going to need your server credentials to log in via FTP. These can usually be found within your hosting provider’s admin panel.

Finally, we’re assuming that you already have a domain name purchased, and you’ve gotten it ready by pointing it to the correct nameservers. If not, you’ll want to make sure this is sorted out before you do anything else.

How to Change Your Domain Name

Now that the prep work is out of the way, let’s get down to business! Here are the three steps you’ll need to follow in order to change your WordPress site’s domain name.

Step 1: Change Your URL Within WordPress

Your first task is to physically change your site’s URL within WordPress. However, this step comes with a word of warning. Once you save your changes, your site’s back end won’t be accessible until you’ve completed the rest of this procedure.

To begin, log into WordPress, and navigate to the General > Settings screen:

 

 

This screen contains global settings for your WordPress site. The fields we’re interested in are WordPress Address (URL) and Site Address (URL):

 

 

To change your URL, simply type the new address into both of these fields, and click on Save Changes. As we mentioned, this will make your site temporarily inaccessible.

Step 2: Edit Your wp-config.php File

Before you can access your site again, you’ll need to update your wp-config.php file to reflect the changes you’ve made. This is another reason a full backup is vital before beginning this process.

Open up FileZilla (or whatever FTP client you prefer), and log in by entering your credentials into the Host, Username, Password, and Port fields. Then, select Quickconnect:

 

 

At this point you’ll see two lists of folders. The ones on the right-hand side are most important, as those are on your server. First, you’ll need to find your website’s root folder, which is often called wwwor public_html, or is named after your site. Then look for the wp-config.php file within that folder.

This is one of WordPress’ core files, which dictates how your site works and how it connects to the web. To edit it, right-click on the file and choose View/Edit. This will open it in your text editor of choice:

 

 

Here, you’ll need to add two lines to the file, right before /* That’s all, stop editing! Happy blogging. */:

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

Of course, you should replace the placeholder URLs with your new address. Once you save your changes and upload the new version of the file back to your server, you should be able to access your site again, and your domain should be changed! However, your work is not quite done.

Step 3: Set Up Permanent Redirects and Notify Search Engines of the Change

This final step is more of a ‘clean-up’ job. Even once your domain is successfully changed, you’ll have a lot of links throughout your content and across the web that point back to your previous address. Fortunately, you can permanently redirect those links to your new domain.

To do this, you’ll need to once again access your site via FTP, and look for the .htaccess file. This is another WordPress configuration file (so it’s worth copying to your desktop as a backup before you tweak it). Within, you’ll want to add the following code:

#Options +FollowSymLinks RewriteEngine on RewriteRule ^(.*)$ http://www.example.COM/$1 [R=301,L]

Again, the placeholder URL should be changed reflect your new domain.

Once you’re done with that, the final task is to tell Google that you’ve updated your domain. The process is straightforward within Google Search Console, and will only take a few minutes.

Get Support for More Common WordPress Questions from WP Engine

Of course, a task as major as changing your domain name requires you to have confidence in your site – as well as your hosting provider. WP Engine is the market leader in reliable WordPress hosting, and what’s more, our support team is stellar!

There are many WordPress-related tasks you may not be sure how to approach, but help is at hand. We have a dedicated Resource Center packed to the roof with helpful articles (just like this one), which you can access whenever you need it. Check it out today!

728x90

For the instructions outlined in this tutorial to work, you must use version 6.77 or earlier of the All-in-one WP Migration Plugin.

You can download version 6.77 here, all-in-one-wp-migration.6.77

In the constants file…

/wp-content/plugins/all-in-one-wp-migration/constants.php Find this…

// =================

// = Max File Size =

// =================

define( ‘AI1WM_MAX_FILE_SIZE’, 2 << 28 );

 

and replace with this…

// =================

// = Max File Size =

// =================

define( 'AI1WM_MAX_FILE_SIZE', 2 << 28 *1.2);

 

And you will have 16GB upload limit.

Increasing the 512MB size limit on All-in-One WP Migration Plugin

If the size of your .wpress file exceeds 512MB, you will be invited to buy the Unlimited Extension of All-in-One WP Migration.

Go ahead and open up /wp-content/plugins/all-in-one-wp-migration/constants.php

Find constants.php on following path

Lines 246:249 define the file upload size limit, there’s a nice comment there indicating such. If you’d like to control+f “size”, it should take you right to it.

// =================

// = Max File Size =

// =================

define( 'AI1WM_MAX_FILE_SIZE', 536870912 );

 

You’ll see the max size is defined in Bytes. In order to increase the upload size limit to 4GB, simply multiply the number seen here by 8.

 

// =================

// = Max File Size =

// =================

define( 'AI1WM_MAX_FILE_SIZE', 4294967296 );

 

Alternative Method

// =================

// = Max File Size =

// =================

define( 'AI1WM_MAX_FILE_SIZE', 536870912 * 8 );

 

Once you complete save the file and navigate back to the “import” function for the All-In-One Migration Plugin. The file upload limit now reads 4GB.

Now you can upload your file

728x90

This is snippet that we’ve used for ages on our site so I thought I’d share it with you. What it enables you to do is add an external link to the featured image on the main post page. This is particularly useful for linking to client websites, affiliate links or any manner of URLs where linking out to an alternate URL is desirable.

WordPress add External link to Featured Image

Updated for Custom Fields with Gutenburg WordPress 5.0 (see step 2 on how to enable Custom Fields for Gutenburg)

Just 3 steps

  1. Add the following WordPress snippet to your WordPress Theme functions.php file

    Save your file

  2. Ensure that you have WordPress custom fields enabled in your version of WordPress(previously in top admin dropdown). If you are using WordPress 5.0 with Gutenburg then you’ll find they have been inexplicably removed and you’ll need to add them back in with the WordPress Custom Fields for Gutenberg plugin. Download and install it.
  3. Now compose your post as usual and add the featured image. Then access the Custom Fieldspanel on your post page and ‘Add New Custom Field’ ExternalUrl and then add your desired destination external URL in the ‘Value’ entry like the below and that’s it – your featured image will now link externally to the Link set.
    wordpress add link to featured image WordPress add link to Featured Image new custom field

You can test this feature by clicking the Featured Image on this page and this will take you back to the Slick Media homepage in a new window 🙂

ABOUT THE AUTHOR
wordpress add link to featured image WordPress add link to Featured Image 0da77002febbfe28d15144a57bbcc2c9 s 180 d mm r g

Glenn

A highly experienced Web Designer / Web Developer (Webflow, WordPress, Weebly & Custom), Front-end / Back-end Developer & New Media Specialist, with extensive knowledge of a wide spectrum of technologies in the Development and Creative Industries, built up over a number of years.


728x90

This is a useful trick If you’re developing a website for client on WordPress and want to manually redirect users after logout of your WordPress website. By default, WordPress will redirect them to the login page of your website, but we can easily change it by adding following snippet to current theme’s functions.php file:

Above snippet will redirect your users to the homepage of your website. You can also define custom URL or external URL by adding following snippet:


+ Recent posts