Tag - Move

How to Move Custom Domain Blogger Blog to WordPress (Updated)


Do you want to move your custom domain Blogger blog to WordPress? Blogger is a free blogging platform that has been around for a very long time.

Normally, a free blog on Blogger has blogspot.com in their website address. For example, myblog.blogspot.com.

In our main Blogger to WordPress migration tutorial, one of our readers asked us for step by step instructions on moving custom domain blogger website to WordPress.

That’s because Blogger also allows users to connect custom domain names to their blogs such as myblog.com.

If you have a custom domain Blogger blog, and you want to move it to WordPress, then this tutorial is for you.

In this step by step guide, we will show you how to easily move a custom domain blog from Blogger to WordPress.

Moving custom domain Blogger blog to WordPress

Note: If you’re looking for moving a normal Blogger subdomain blog to WordPress, then see our guide on how to switch from Blogger to WordPress.

Following are the steps we will cover to help you move your custom domain blog from Blogger to WordPress.

  1. Getting started
  2. Change DNS settings
  3. Remove domain redirect
  4. Install WordPress
  5. Export content from Blogger
  6. Import content in WordPress
  7. Setup Permalinks
  8. Redirect Blogger feeds to WordPress
  9. Customizing WordPress
  10. Extending your WordPress site

Step 1: Getting Started

Before we start, it is important to note that this guide is for the self-hosted WordPress blog. See our guide on the difference between self hosted WordPress.org site vs WordPress.com blog.

In order to get started, you will need a WordPress hosting provider to set up your self hosted WordPress website.

We recommend Bluehost because they are an officially recommended WordPress hosting company, and they are giving WPBeginner users exclusive 60% discount + free domain and SSL.

Basically, you can get started for $2.75 / month.

→ Click Here to Claim This Exclusive Bluehost Offer ←

If you want a Bluehost alternative, then take a look at Siteground. They also have a special offer for WPBeginner users.

Step 2: Change DNS Settings

Blogger allows you to use any domain name registered by a 3rd party. U.S. based users can also use a domain registered with Google Domains.

When you first setup the domain pointing to your Blogger blog, you were asked to add CNAME and A records to your domain’s DNS settings.

These domain name records help browsers decide where to direct users when they enter your domain name. See our guide on domain names and how they work)

You will need to delete those old records and add your new WordPress host’s DNS settings.

You can get DNS settings required by your WordPress hosting company from their documentation or support websites. A typical DNS nameserver looks something like this:

NS1.Bluehost.com
NS2.Bluehost.com

In this guide, we will show you how to update DNS settings in Godaddy. However the basic settings are the same across all popular domain registrars.

Changing DNS Settings in GoDaddy

You need to Login to your Godaddy account and click on the manage button next to domains. After that you need to click on the gear icon next to your domain and then select manage DNS.

Launch DNS management in GoDaddy

You will see your domain information page. Next, you need to click on the DNS Zone File. This is where all the DNS level records for your domain are stored.

Edit DNS zone file in GoDaddy

On the DNS Zone File page, you need to locate the A record and CNAME aliases you added for your Blogger blog and delete them.

Don’t forget to click on the save changes button to apply your changes.

The next step is to setup nameservers for your WordPress hosting provider.

Go back to manage DNS page for your domain and then click on ‘Manage’ under the namservers section.

Manage nameserver settings

On the next page, you need to click on ‘Custom’ and then click on edit nameservers link to add your new WordPress hosts nameservers.

Adding nameservers

Click on the save button to make your DNS changes go live.

Important: DNS changes may take anywhere between a few hours to one or even two days to fully propagate. During this time, you can access your Blogger blog by logging into your account.

Step 3: Remove Domain Redirect

Your Blogger blog’s original blogspot.com address is redirecting users to your custom domain. Since we have changed the domain settings, we need to remove this from Blogger too.

Simply log into your Blogger account and go to Settings » Basic page. Under the publishing section, click on the cross icon to cancel the redirect.

Remove custom domain redirect from Blogger

Step 4: Install WordPress

If your domain’s DNS has propagated now, then you can install WordPress on your hosting provider.

If your domain is registered on a 3rd party service other than your web host, then you will need to add the hosting for the domain.

For example, in Bluehost you will add your domain as an Addon domain through cPanel unless it is the main domain on your account.

Adding a domain name to your hosting account

After adding domain to your new host, the next step is to install WordPress. Most hosting companies have simple 1-click WordPress installers that you can use to quickly install WordPress.

If you need more help, then follow the instructions in our complete WordPress installation tutorial.

After successful installation of WordPress on your custom domain, you will be ready to import content from your Blogger blog.

Step 5: Export Content From Blogger

Before you can import content into WordPress, first you need to export it from your Blogger blog.

Blogger allows you to export content in an XML file.

Simply login to your Blogger blog and visit Settings » Other page. Under the blog tools, click on the Backup Content link.

Export blog posts from Blogger

This will bring up a popup where you need to click on the ‘Save to your computer’ button.

Depending on the file size, it may take a few seconds or a few minutes. Once you have your data, it is time to import it into your WordPress site.

Step 6: Import Blogger Blog into WordPress

Login to your WordPress admin area and visit Tools » Import page. There you will see a list of importers for different services. You need to click on Blogger to install the Blogger importer.

Install Blogger importer tool for WordPress

WordPress will now download and install the Blogger Importer plugin for you. Once it is finished installing the plugin, you need to click on Run Importer link to continue.

Run Blogger importer

On the Import Blogger screen, WordPress will ask you to upload the XML file. Simply click on choose file button and upload the XML file you downloaded earlier. Click on the Upload file and import button to continue.

Upload file to import

WordPress will now import your blog posts from Blogger, once it is finished you will be asked to assign an author to the imported posts. You can assign your blogger posts to an existing author or create a new one.

Congratulations! you have successfully imported your Blogger blog into WordPress.

However, you still need to make sure that you don’t lose any search rankings by redirecting search engines and visitors to the same content on your new WordPress powered website.

WordPress comes with a feature that allows you to set up SEO friendly URL structure.

However, since you are importing content from Blogger, you would want your permalink structure to be as close to your Blogger URL structure as possible. To set permalinks you need to go to Settings » Permalinks and paste this in the custom structure field:

/%year%/%monthnum%/%postname%.html

Change permalinks

Setp 8: Setup Feed Redirects

You have successfully redirected your Blogger blog to WordPress. However, users who have subscribed to your Blogger RSS feed will stop receiving updates.

You need to redirect feed requests to your WordPress feeds. This can be easily achieved by editing the .htaccess file in your WordPress site’s root folder.

If you can’t find your .htaccess file, then see this tutorial.

Start by connecting to your WordPress site using an FTP client. You will need to enable ‘Show Hidden Files’ option in your FTP client settings. If you are using Filezilla, you will find this option under Server menu.

Show hidden files in FTP

Once you are connected to your website, you will find the .htaccess file in your WordPress site’s root directory. You need to edit this file and paste the following code before any other code in the file.

<IfModule mod_rewrite.c>
   RewriteEngine on
   RewriteRule atom.xml /feed? [L,R=301]
   RewriteRule rss.xml /feed? [L,R=301]
   RewriteRule ^feeds/posts/?.*$ /feed? [L,R=301]
   RewriteRule ^feeds/comments/?.*$ /comments/feed? [L,R=301]
</IfModule>

Don’t forget to save your changes and upload the .htaccess file back to the server. Your Blogger feed subscribers will now be redirected to your WordPress site’s feed.

Step 9. Customizing Your WordPress Site

Themes control the appearance of your WordPress site. You can use them to change your website’s colors, layout, navigation menus, and more.

WordPress themes

By default, WordPress comes with a very simple theme that doesn’t offer many features.

Luckily, there are thousands of WordPress themes available that you can choose from.

Following are a few of our showcases with our expert-pick of best WordPress themes in different categories.

Here are a few tips that you should consider when looking at these themes.

  • Simplicity is the best design. Look for a simple theme with flexible features.
  • You will not find a theme exactly as you had on Blogger, but you can look for a theme with similar layout and color choices
  • Make sure that the theme you are choosing looks good on mobile devices
  • Only install a theme from reliable sources like WordPress.org or one of the top WordPress theme shops.

Once you have found a theme, you can go ahead and install it. See our beginner’s guide on how to install a WordPress theme for step by step instructions.

Note: You can also use one of these drag & drop WordPress page builders to create completely custom website designs without writing any code.

Step 10. Extending Your WordPress Site

WordPress plugins

One of the top reasons for using WordPress is the large number of plugins that you can use. Plugins are like apps for your WordPress site. You can use them to add new features and extend WordPress functionality.

Now, as a beginner, you may be wondering how to start using these plugins? Which plugins you should try first?

Don’t worry we got you covered there as well. Check out our expert selection of the essential WordPress plugins that you should install first.

Next, you should know that WordPress is not just limited to blogs. You can use it to create any type of website you can imagine.

Finally, as a new WordPress user, you may need help now and then. WPBeginner is the largest WordPress resource site for beginners. See how you can make the most out of WPBeginner’s free resources.

We hope this article helped you move your custom domain blogger blog to WordPress. You may also want to see our list of 40 useful tools to manage and grow your WordPress blog.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

The post How to Move Custom Domain Blogger Blog to WordPress (Updated) appeared first on WPBeginner.





Source link

Read more...

How to Easily Move WordPress to a New Domain (without Losing SEO)


Do you want to move your WordPress site to a new domain? Changing your website’s domain name can significantly impact your SEO rankings, and it’s a process that needs to be done very carefully.

While you cannot avoid temporary SEO fluctuations when moving your website to a new domain, you can definitely minimize the impact and quickly regain your search traffic and rankings.

In this guide, we will show you the proper way to move WordPress to a new domain without losing SEO.

Properly moving WordPress to another domain name

Here’s the 5 step process that we will cover to help you migrate your WordPress site to a new domain name:

  1. Create a Duplicator package of your WordPress site
  2. Create a database for new domain name
  3. Unpack WordPress on new domain
  4. Setup Permanent 301 redirects
  5. Notify Google about the change

Before You Start

Before you start, we want to emphasize a few things.

The process of switching to a new domain will temporarily affect your search engine rankings as Google and other search engines adjust to the changes.

Yes, this will also temporarily affect your search traffic as well. Please keep in mind that this is normal, and it happens to all websites that switch to a new domain.

However, you can dramatically decrease the SEO impact by following this guide. We will show you the right way of moving your WordPress site to a new domain name, setting up proper 301 redirects, and notifying search engines.

Please note that this guide is not for moving WordPress site to a new web host. This is for switching a domain name. Yes, while the process is similar, there are extra things involved in this process.

Pre-Steps

In this guide, we are assuming that you have your WordPress site setup on oldsite.com, and you are trying to migrate it to newsite.com.

We are also assuming that you already have a web hosting account, and you are familiar with your web hosting control panel.

You will also need to know how to use FTP.

In case you don’t have a web hosting account, we recommend using Bluehost (great for small sites + comes with a free domain) or WP Engine (great for large sites).

Once you have your new web hosting account and domain name, you’re ready to start the process.

Step 1: Create a Duplicator package of Your WordPress Site

The first thing you need to do is create a full backup of your WordPress site. While there are many WordPress backup plugins available, the one we’re going to show in this step does both backups and migrations.

It’s Duplicator and it’s a completely free plugin.

Let’s start by installing and activating the Duplicator plugin on your old domain name. For more details, see our step by step guide on how to install a WordPress plugin.

Once activated, the plugin will add a Duplicator menu item in your WordPress admin. You need to click on the Duplicator menu, and then click on the create button to create a new package.

Create a new Duplicator package

After that, you will be asked to click on the Next button to continue.

Duplicator will now run the website duplicator wizard. First, it will run some tests to see if everything is in order. If all items are marked ‘Good’, then click on the ‘Build’ button.

Build Duplicator package for switching to new domain name

The plugin will now start creating a duplicator package of your WordPress site. This process may take a few minutes depending on the size of your website.

Once finished, you’ll see download options for Installer and the Archive package. You need to click on the ‘One click download’ link to download both files to your computer.

Download Duplicator package

The archive file is a complete copy of your website, and this will allow you to move WordPress to another domain name. The installer script will automate and run the migration by unpacking the archive file.

Step 2. Create a Database for New Domain Name

Before you can move, you’ll need a database to unpack WordPress on your new domain name.

If you have already created a database, then you can skip this step.

To create a database, you need to visit your hosting account’s cPanel dashboard, scroll down to the ‘Databases’ section, and then click on the ‘MySQL Databases’ icon.

Database icon in CPanel

On the next screen, you’ll see a field to create a new database. Simply provide a name for your database and click on the ‘Create Database’ button.

Create database for switching to another domain name

cPanel will now create a new database for you. After that, you need to scroll down to the MySQL Users section.

Next, provide a username and password for your new user and click on the ‘Create a user’ button.

Adding a new MySQL user

The new user you just created, still does not have permission to work on the database. Let’s change that.

Scroll down to the ‘Add User to Database’ section. Simply select the database user you created from the dropdown menu next to the ‘User’ field, then select the database, and click on the add button.

Add user to database

Your database is now ready to be used on for moving WordPress to the new domain name. Make sure to note down the database name, username, and password. You’ll need this information in the next step.

Step 3. Unpacking WordPress on New Domain Name

Now you need to upload the Duplicator files you downloaded earlier to your new domain name.

First, connect to your domain name using an FTP client. Once connected, make sure that the root directory of your website is completely empty.

After that, you can upload the archive and installer files to the root directory.

Upload Duplicator files to new domain name

Once both files have finished uploading, you are now ready to unpack WordPress.

Open a new browser tab and go to the following URL:

http://example.com/installer.php

Don’t forget to replace example.com with your new domain name. This will launch the Duplicator migration wizard.

Duplicator wizard

The installer will look for the archive file. You need to check the terms and conditions checkbox and click on the next button to continue.

Now, the installer will ask you to enter your WordPress database information.

Your host will likely be localhost. After that, you will enter the details of the database you created for your new domain name in the earlier step.

Connect to the database for your new domain name

Once done, click on the next button to continue.

Duplicator will now unpack your WordPress database backup from the archive into your new database.

Next, it will ask you to update site URL or Path. You shouldn’t have to change anything since it automatically detects the URL of your new domain name and its path.

If it doesn’t, then you can change the URL to your new domain name. After that, click on the next button to continue.

Update URL to your new domian name

Duplicator will now finish the migration.

You can click on the ‘Admin Login’ button to enter the WordPress admin area of your website on the new domain name.

Finishing WordPress migration to new domain name

Step 4. Setting up Permanent 301 Redirects

Setting up a permanent 301 redirect is very important for both SEO and user experience.

This step will allow you to automatically redirect users and search engines to your new domain name.

In other words, whenever someone lands on one of your old posts or pages, they will be automatically redirected to your site on the new domain.

To setup a permanent 301 redirect, you need to connect to your old site using FTP and edit the .htaccess file.

This will be located in the same directory as your wp-includes or wp-admin folder. Open the .htaccess file and paste the following code at the very top:

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

Note: Replace newsite.com with your new domain in the above code.

Once you have applied these changes, then visit your old domain name. It should automatically redirect you to the new domain.

If it doesn’t, then it means the redirection is not setup properly, and your server likely doesn’t support redirect rules. You need to reach your web hosting’s support to get RewriteEngine turned on.

Step 5. Notifying Google About the Change

Now that you have moved WordPress to a new domain name and setup redirects, it is time to notify Google about the change of address. This will help Google find your new domain name quickly and start showing it in search results.

First, you need to add your new domain name to the Google Search Console. See step 1 in our Google Search Console guide for instructions.

After you have added your new site, you need to switch to the old version of Google Search Console.

Go to old version of Google Search Console

Next, you need to switch to your old domain name and then click on the gear icon at the top to launch change of address tool.

Change of address tool

On the next screen, Google Search Console will show you a step by step wizard to submit your change of address request.

First it will ask you to select your new site from the drop down menu. After that, click on the check button to test 301 redirects and then confirm verification.

Change of address for your old domain name

Finally, click on the submit button to send your address change request.

Notify Users About the Move to New Domain Name

While the 301 redirects do their job, it is always good to make a public announcement about the migration.

You can do this by simply writing a blog post on your new site and sharing it on your social media accounts.

If you have an email marketing list, then you should send a newsletter to let all your subscribers know.

This can be helpful in a lot of ways.

First and foremost, your users are more likely to remember the new domain once they read about it.

Second, you can ask your users to let you know if they see any bugs. You alone cannot test your site in all different type of browsers and system environments. It’s always helpful to have a fresh pair of eyes looking at it.

We hope that this tutorial helped you move your WordPress site to a new domain name. You may also want to see our guide on how to track your search keyword rankings after moving to a new domain name.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

The post How to Easily Move WordPress to a New Domain (without Losing SEO) appeared first on WPBeginner.





Source link

Read more...

How to Move WordPress From Local Server to Live Site (2 Methods)


One way to speed up your website development is to build your website locally on your own computer using a software like WAMP (for Windows) or MAMP (for Mac).

Once you’re finished perfecting your website, the next step is to move it from your computer to a live site and share your creation with the world. In this article, we will show you how to easily move WordPress from local server to a live site.

Move WordPress From Local Server to Live Site

We will cover two different methods to move WordPress from local server to your live website (step by step).

The first method uses a WordPress migration plugin and is recommended for beginners. In the second method, we will show you how to manually move WordPress from local server to a live site.

You can choose the method that best suits you:

Before You Begin

In order for you to migrate WordPress from localhost to live server, you need to have a few things in place.

First, we’re assuming that you have a WordPress site running on local server (also called localhost) on your computer, and you have full access to it.

Next, you’ll need to have a domain name and web hosting. We have a list of the best WordPress hosting companies that you can choose from.

To speed it up, you can use Bluehost. They’re an official WordPress recommended hosting provider, and they are offering our users an exclusive 60% off discount + a free domain.

If you need help setting up your website, follow our step by step guide on how to make a website.

Finally, you will need to have a FTP program and know how to use FTP, so you can upload your content to the live site.

Ready? Let’s begin migrating your WordPress site.

Method 1. Transfer WordPress from Local Server to Live Site Using a Migration Plugin

This method is easier and recommended for beginners. We’ll be using a WordPress migration plugin to move WordPress from localhost to a live site.

Step 1. Install and Setup Duplicator Plugin

First, thing you need to do is install and activate the Duplicator plugin on your local site. For more details, see our step by step guide on how to install a WordPress plugin.

Upon activation, you need to go to Duplicator » Packages page and click on the ‘Create New’ button.

Creating a new Duplicator package

After that, click on the next button to continue.

Duplicator will now run some tests to see if everything is in order. If all items are marked ‘Good’ then click on the ‘Build’ button.

Build package

This process may take a few minutes depending on the size of your website. You need to leave this tab open until the process is complete.

Once finished, you’ll see download options for Installer and the Archive package. You need to click on the ‘One click download’ link to download both files to your computer.

Download package

So what are these files?

Well, the archive file is a copy of your complete WordPress website. It includes all WordPress core files as well as your images, uploads, themes, plugins, and a backup of your WordPress database.

The installer file is a script that will automate the migration by unpacking the archive file.

Step 2. Create a Database for Your Live Site

Before you can run the installer or upload the WordPress website from localhost to your hosting server, you will need to create a MySQL database for your live website.

If you have already created a MySQL database, then you can skip this step.

To create a database you need to visit your hosting account’s cPanel dashboard. Scroll down to the Databases section and then click on the MySQL Databases icon.

Database icon in cPanel

On the next screen, you’ll see a field to create a new database. Simply provide a name for your database and click on the ‘Create Database’ button.

Create new database

cPanel will now create a new database for you. After that, you need to scroll down to the MySQL Users section.

Next, provide a username and password for your new user and click on the ‘Create a user’ button.

Add a MySQL user

The new user you just created, still does not have permission to work on the database. Let’s change that.

Scroll down to the ‘Add User to Database’ section. Simply select the database user you created from the dropdown menu next to the ‘User’ field, then select the database, and click on the add button.

Save user to the database

Your database is now ready to be used with your WordPress site. Make sure to note down the database name, username, and password. You’ll need this information in the next step.

Step 3. Upload Files from Local Server to Live Site

Now you need to upload the archive and installer files from your local site to your hosting account.

First, connect to your live site using an FTP client. Once connected, make sure that the root directory of your website is completely empty.

Normally, root directory is the /home/public_html/ folder.

Some WordPress hosting companies automatically install WordPress when you sign up. If you have WordPress files there, then you need to delete them.

After that, you can upload the archive and installer files from Duplicator to your empty root directory.

Migration files in the root directory

Step 4. Runing The Migration Script

After you have uploaded the migration files, you need to visit the following URL in your browser:

http://example.com/installer.php

Don’t forget to replace example.com with your own domain name.

This will launch the Duplicator migration wizard.

Duplicator intialized

The installer will automatically scan for the archive file and run a validation test. You need to check the terms & conditions checkbox and continue by clicking on the Next button.

On the next screen, it will ask you to enter your WordPress database information.

Your host will likely be localhost. After that, you will enter the details of the database you created in the earlier step.

Connect your database

Click on the next button to continue.

Duplicator will now import your WordPress database backup from the archive into your new database.

Next, it will ask you to update site URL or Path. You shouldn’t have to change anything since it automatically detects the URL of your live website, and its path.

Update site URL

Click on the next button to continue.

Duplicator will now finish the migration and will show you a success screen. You can now click on the ‘Admin Login’ button to enter the WordPress admin area of your live site.

Successfully moved

Once you login to your live site, Duplicator will automatically clean up the installation files.

That’s all, you have successfully moved WordPress from local server to your live site.

Method 2. Manually Transfer WordPress from Local Server to Live Site

In this method, we will show you how to manually move WordPress from local server to your live site. It will come in handy if the first method doesn’t work or you prefer to do it manually.

Step 1: Export Local WordPress Database

The first thing you need to do is export your local WordPress database. We’ll be using phpMyAdmin to do that. If you are unfamiliar with it, then you might want to take a look at our guide to WordPress database management using phpMyAdmin.

Simply go to http://localhost/phpmyadmin/ and click on your WordPress database. Next, click on the Export button from the top menu bar.

Export from localhost

In the Export Method option, you can choose “Quick” or “Custom”. Custom will provide you with more options to export your database.

We recommend choosing Quick, and then click the Go button to download your database.

Export WordPress database using phpMyAdmin

Step 2: Upload WordPress Files to Live Site

Now we’ll need to move all your website files to the live site.

To get started, go ahead and open your FTP client and connect to your web hosting account.

Once you’re connected to your live site, make sure you upload the files in the right directory. For example, if you want the site to be hosted on yoursite.com, then you would want to upload all the files in your public_html directory.

Now select your local WordPress files and upload them to your live server.

Uploading WordPress from localhost to live site

Step 3: Create MySQL Database on Live Site

While your FTP client is uploading your WordPress files, you can start importing your database to the live server. Most WordPress hosting providers offer cPanel to manage your hosting account, so we’ll show you how to create a database using cPanel.

First, you need to log in to your cPanel dashboard and click on the MySQL Databases icon which can be found in the databases section.

Database section in cpanel

On the next screen, create a database by entering a name for your database and clicking the Create Database button.

New database

After creating your database, scroll down to the MySQL Users section and create or add an existing user to the database.

After adding the user, cPanel will take you to set MySQL privileges for that user. Simply grant all privileges to the user by making sure every box is checked, and then click the Make Changes button.

grant all privileges to database user

Step 4: Import WordPress Database on Live Site

The next step in the process is to import your WordPress database.

Go to your cPanel dashboard, scroll down to the databases section and click on phpMyAdmin.

This will take you to phpMyAdmin where you want to click on the database you created in Step 3. PhpMyAdmin will show your new database with no tables.

Click on the Import tab in the top menu. On the import page, click on Choose File button and then select the database file you saved in Step 1.

Lastly, press the Go button at the bottom of the page. PhpMyadmin will now import your WordPress database.

Import database via phpMyAdmin

Step 5: Change the Site URL

Now you need to change the site URL in your database, so that it will connect with your live WordPress site.

In phpMyAdmin, look for the wp_options table in your database that we just imported in step 4. If you changed your database prefix, then instead of wp_options it might be prefix_options.

Click on the Browse button next to wp_options or the link that you see in the sidebar to open the page with a list of fields within the wp_options table. See screenshot below:

Browse the wp options table

Under the field options_name, you need to look for siteurl. Click the Edit Field icon which can be found at the far left at the beginning of the row.

Edit siteurl in phpMyAdmin

When you click the edit field, an edit field window will appear. In the input box for option_value, you will see the URL of your local install probably something like: http://localhost/test. Carefully insert your new site url in this field, for example: https://www.wpbeginner.com

Save the field by clicking the Go button.

edit the siteurl field

Next, you need to replicate this step for the option name: home. The wp_options page can be a few pages long, so simply find the home tab.

Usually it is on the second page which you can navigate to by clicking on the pagination arrows in phpMyAdmin.

Update the home url to be the same as your siteurl.

Step 6: Setup Your Live Site

Now that we have imported the database and all of our content should be uploaded, it’s time to configure WordPress.

At this time, your site should be showing an Error Establishing Database Connection error.

To fix this, connect to your website using an FTP client and edit wp-config.php file.

You will need to provide the database name, user and password you created earlier in Step 3.

Next, save the wp-config.php file and upload it back to your server.

You can now visit your website, and it should be live now.

Next, you need to login to your WordPress admin panel and go to Settings » General. Without changing anything, scroll to the bottom and click the Save Changes button.

This will ensure that the site URL is corrected anywhere else that it needs to be.

After that go to Settings » Permalink and click Save Changes to ensure that all post links are working fine.

Step 7: Fix Images and Broken Links by Updating Paths

Whenever you are moving a WordPress site from one domain to another, or from local server to a live site, you’ll face broken links and missing images.

You can either use the SQL query or use the Velvet Blues WordPress plugin.

For those who want to do it via SQL, here is a simple SQL query that should solve this problem:


UPDATE wp_posts SET post_content = REPLACE(post_content, 'localhost/test/', 'www.yourlivesite.com/');

Simply go to phpMyAdmin, click on your database and then click on SQL from top menu. Write this query, but don’t forget to change it with your own local site and live site URLs.

Fixing WordPress images and broken URLs after moving to live site

That’s all, you have successfully migrated WordPress from localserver to a live site!

Hopefully now your live website is up and running smoothly. Be sure to check out your website to make sure that everything is working as expected. If you notice any errors, you can check out our guide to common WordPress errors for help troubleshooting.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.





Source link

Read more...

How to Move WordPress to a New Host or Server With No Downtime


Are you planning to move your WordPress site to a new hosting company or a different server? The biggest risk when switching web hosting or migrating a website to a new server is data loss and downtime.

Both of these can make your website temporarily inaccessible to users and search engines which can result in loss of sales and search engine rankings.

In this step by step tutorial, we will show you how to safely migrate your WordPress site to a new host without any downtime.

We’ll also answer the most frequently asked questions about moving a WordPress site to new hosting provider, so you can avoid making some common mistakes.

Migrating WordPress from one host to another

Important: Before we start, we want you to know that a lot of WordPress hosting companies offer a free migration service. It might not be listed on their website, so all you have to do is ask. Usually it’s free, but some may charge a small fee.

Having that said, let’s take a look at the steps we’ll cover to move WordPress to a new hosting server (without any downtime).

  1. Choose a new WordPress host
  2. Setup the Duplicator Plugin for Easy Migration
  3. Import your WordPress site to the new host
  4. Change the Hosts file to prevent downtime
  5. Create a MySQL database on your new host
  6. Run Duplicator website migration script
  7. Updating your domain name server
  8. FAQs about moving WordPress to new host

Ready? Let’s get started.

Step 1: Choose Your New WordPress Host

If you are stuck with a slow web host even after optimizing WordPress speed and performance, then it’s time to move your WordPress site to a new host that can handle your growing traffic.

When looking for a new WordPress hosting provider, it’s important to choose carefully, so you don’t have to move again any time soon.

Here’s who we recommend:

  • For reliable shared hosting, we recommend going with Bluehost. They’re officially recommended by WordPress.org. Using our Bluehost coupon, WPBeginner users get 60% off and a free domain name.
  • If you’re looking for cloud hosting or location-specific providers, then we recommend you check out Siteground. They have data centers across 3 different continents.
  • If you’re looking for managed WordPress hosting, then we recommend you check out WP Engine. They are the best and most well-known provider in the industry.

After buying your new hosting, do NOT install WordPress. We’ll do that in a later step.

For now, your new web hosting account should be completely empty with no files or folders in your main directory.

Step 2: Setup Duplicator for Easy Migration

The first thing you need to do is install and activate the free Duplicator plugin on the website that you want to move. For more details, see our step by step guide on how to install a WordPress plugin.

Duplicator is a free plugin that we highly recommend. You can also use it to move your website to a new domain name without losing SEO.

However, in this article, we will walk you through how to use it to migrate your WordPress site from one host to another with zero downtime.

Once you have installed and activated Duplicator, go to the Duplicator » Packages page in your WordPress admin area.

Next, you need to click the ‘Create New’ button in the top right corner.

Creating a new package in Duplicator

After that, click the Next button and follow the steps to create your package.

Duplicator create a package wizard

Make sure that your scan results check out (everything should say “Good”), and then click the Build button.

Build package

The process may take several minutes to complete, so leave the tab open as the plugin does its job.

Once the process is complete, you’ll see download options for Installer and the Archive package. You need to click on the ‘One click download’ link to download both files.

Download package files

The archive file is a copy of your complete website, and the installer file will automate the installation process for you.

Step 3: Import Your WordPress Site to the New Host

Now that you have downloaded both the archive and installer files, the next step is to upload them to your new web host.

You can do this by connecting to your new web host using FTP.

If you’ve never done this before, check out our beginner’s guide to uploading files via FTP to WordPress.

Normally, you would enter your website’s domain name as host when connecting your FTP client.

However, since your domain name is still pointing to your old host, you’ll need to connect by entering your server’s IP address or server hostname. You can find this information from your new hosting account’s cPanel dashboard.

Finding server IP or Hostname in cPanel dashboard

If you are unable to find this information, then you can ask for support at your new web hosting company, and they will help you out.

Using the FTP client, you need to upload both installer.php file and your archive .zip file to the root directory of your website.

This is usually /username/public_html/ folder.

Again, if you are not sure, then ask your web hosting company.

Make sure that your root directory is completely empty. Some web hosting companies automatically install WordPress when you sign up.

If you have WordPress installed in your root directory, then you need to delete WordPress first.

Once done, you need to upload both the archive zip file and installer.php file to your site’s root directory.

Step 4: Change The Hosts File to Prevent Downtime

Once you’ve uploaded both files to your new host, you need to access the installer.php file in a browser.

Normally, this file can be accessed using a URL like this:

http://www.example.com/installer.php

However, this URL will take you to your old web host, and you will get a 404 error. This is because your domain name is still pointing to your old web host.

Normally, other tutorials might tell you to change your domain nameservers and point it to your new hosting company, but that’s wrong.

If you do this now, then your visitors will see a broken website as you migrate it.

We’ll show you how you can access your new site temporarily on your computer, without affecting your old site.

This is done with a hosts file on your computer.

The hosts file can be used to map domain names to specific IP addresses. In other words, it lets you trick your computer in thinking that the website is moved even though it’s not.

Let’s take a look at how to add an entry for your domain name in the hosts file, so that it points to your new hosting company.

Making these changes will allow you to access the files on your new host using your own domain name, while the rest of the world will still be accessing your site from the old host. This ensures 100% uptime.

The first thing you need to do is find the IP address of your new web hosting server. To find this, you need to log into your cPanel dashboard and click on expand stats link in the left-hand sidebar. Your server’s address will be listed as Shared IP Address.

On some web hosting companies, you will find this information under ‘Account Information’ heading.

Find shared IP address

In the next step, Windows users need to go to Programs » All Programs » Accessories, right-click on Notepad and select Run as Administrator.

A Windows UAC prompt will appear, and you need to click on Yes to launch Notepad with administrator privileges.

On the Notepad screen, go to File » Open and then navigate to the C:WindowsSystem32driversetc folder. From this folder, select hosts file and open it.

If you’re using Mac, then you need to open the Terminal app and enter this command to edit hosts file:

sudo nano /private/etc/hosts

For both Windows and Mac users, at the bottom of the hosts file, you need to enter the IP address you copied and then enter your domain name. Like this:

192.168.1.22 www.example.com

Make sure that you replace the IP address with the one you copied from cPanel, and example.com with your own domain name.

Once you’re done, save your changes.

You can now access your files on the new host using your domain name on your computer.

Important: Don’t forget to undo the changes you made to hosts file after you have finished the migration (step 6).

Step 5: Creating MySQL Database on Your New Host

Before we run the installer on the new host, you will need to create a MySQL database on your new hosting account. If you have already created a MySQL database, then you can jump to the next step.

Creating a Database in cPanel

Go to your new hosting account’s cPanel dashboard, scroll down to Databases section and click on MySQL databases icon.

MySQL databases in cPanel

You will see a field to create a new database. Enter a name for your database, and click “Create Database” button.

Creating new database

After creating the MySQL database, you need to scroll down to the MySQL Users section.

Next, provide a username and password for your new user and click on the ‘Create a user’ button.

Create a MySQL user

After that, you need to add this user to your database. This will give the username you just created, all the permissions to work on that database.

You can do this by scrolling down to ‘Add User to a Database’ section. Simply select the database user you created from the dropdown menu next to user, then select database, and click on the add button.

Add user to database

Your database is now ready to be used with WordPress. Be sure to make note of the database name, username, and password. You’ll need that information in the next step.

Step 6: Begin the Duplicator Migration Process

Now we’re ready to run the installer. Navigate to the following address in your browser window, replacing example.com with your domain name:

http://www.example.com/installer.php

Duplicator installer initialized

The installer will run a few tests and will show you ‘Pass’ next to archive and validation tests.

You need to check the terms & conditions checkbox and continue by clicking on the Next button.

Now, you will be asked to enter your MySQL host, database name, username, and password.

Your host will likely be localhost. After that, you will enter the details of the database you created in the previous step.

Connect to the database

You can click on the ‘Test Database’ button to make sure you entered the correct information.

If Duplicator is able to connect, then you will see a string starting with Pass. Otherwise, you will see the database connection error details.

Click on the next button to continue.

Duplicator will now import your WordPress database from the archive zip into your new database.

Next, it will ask you to update site URL or Path. Since you are not changing domain names, you DON’T need to change anything here.

Simply click on the next button to continue.

Duplicator will run the final steps and will show you the login button.

Duplicator website migration finished

You can now login to your WordPress site on the new host to make sure that everything is working as expected.

Step 7: Update Your Domain Name Servers (DNS)

At this point, you’ve created a complete copy of your WordPress database and files on your new hosting server, but your domain still points to your old web hosting account.

To update your domain, you need to switch your DNS nameservers. This ensures that your users are taken to the new location of your website when they type your domain into their browsers.

If you registered your domain with your hosting provider, then it’s best to transfer the domain to a new host. If you used a domain registrar like Domain.com, GoDaddy, etc, then you need to update your nameservers.

You will need the DNS nameserver information from your new web host. This is usually a couple of URLs that look like this:

ns1.hostname.com
ns2.hostname.com

For the sake of this guide, we will be showing you how to change DNS nameservers with GoDaddy.

Depending on your domain registrar or web host, the screenshots may look different. However, the basic concept is the same.

You need to look for domain management area and then look for nameservers. If you need assistance with updating your nameservers, then you can ask your web hosting company.

For GoDaddy, you need to login to your GoDaddy account and then click on Domains.

After that, you need to click on the Manage button next to the domain name you want to change.

Manage domain

Under the ‘Additional Settings’ section, you will need to click on ‘Manage DNS’ to continue.

Manage DNS

Next, you need to scroll down to the Nameservers section and click on the change button.

Change nameservers

First, you will need to switch the nameserver type dropdown from ‘Default’ to ‘Custom’. After that, you can fill in the your new hosting provider’s information under Nameservers.

Updating DNS nameservers

Don’t forget to click on the save button to store your changes.

You have successfully changed the nameservers on your domain. DNS changes can take 4 – 48 hours to propagate for all users.

Since you have the same content on your old host and the new host, your users wouldn’t see any difference. Your WordPress migration will be seamless with absolutely no downtime.

To be on the safe side, we recommend that you wait to cancel your old hosting account until 7 days after your migration.

Frequently Asked Questions

Here are a few questions many of our users ask while moving WordPress from one host to another.

1. Can I signup for the new hosting account without registering a domain name?

Yes, you can absolutely signup for a hosting account without registering a domain name.

Domain name and hosting are two different services, and you don’t necessarily need to register a domain name when signing up for new host. For more details see our guide on the difference between domain name and web hosting.

Some hosting providers will ask you to select a domain name as the first step when purchasing hosting. They will also allow you to enter a domain name if you already got one.

2. Do I need to transfer my domain name to the new host?

No, you don’t need to transfer your domain name to the new host. However, transferring your domain name to your new hosting will make it easier to renew and manage under the same dashboard as your new hosting account.

For more on this topic, see our ultimate guide on domain names and how do they work.

3. How do I fix error establishing database connection error in Duplicator?

If you are seeing an error connecting to the database or database connection error in Duplicator, then the most likely reason for this is that you entered incorrect information for your database connection.

Make sure that your database name, MySQL username, and password are correct. Some web hosting companies do not use localhost as the host for their MySQL servers. If this is the case, then you will need to ask your web host’s support staff to provide you with the correct information.

4. How do I check if my website is loading from the new host?

There are several online tools that allow you to see who is hosting a website. After you have transferred your website to the new host, you can use any of these tools, and they will show you the name of the web hosting company hosting your website.

If it hasn’t been long since you migrated your website and made changes to your domain name server (DNS), then chances are that your site may still load from your old host. Domain name changes can take up to 48 hours to fully propagate.

5. Do I need to delete any files or data from old host?

When switching hosting companies, we recommend that you keep your old website for at least a week. After that, you can delete files from your old web host. If you are canceling your account, then your web hosting provider will delete all your data according to their policy.

6. How long should I keep my account active on the old host?

Once you have migrated your website to the new host, and if you don’t have any other websites hosted with your old web host, then you can cancel your old web hosting account.

However, in some cases, you may have already paid them for yearly hosting. You should check their refund policy to see if you are eligible for any refund upon cancellation.

7. How do I move a WordPress site with SSL/HTTPs?

You will need to install SSL certificate on your new hosting provider. After that, you can follow the same steps mentioned above. Just make sure that you use HTTPs in the URLs, like https://example.com

8. Bonus: Free Site Migration by Your New Host

If you’re looking to switch your web hosting, but the steps above sound too complicated, then you can choose the following providers, and they will migrate your website for you.

SiteGround, InMotion Hosting, and WP Engine offer free website migration for WPBeginner users.

We hope that this step by step guide helped you move WordPress to your new host with no downtime whatsoever. If you come across any issues with your WordPress migration, then check out our guide on the most common WordPress errors and how to fix them.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

The post How to Move WordPress to a New Host or Server With No Downtime appeared first on WPBeginner.





Source link

Read more...