Migrating Wordpress site to new domain

后端 未结 4 1433
执念已碎
执念已碎 2021-01-28 13:55

I have a Wordpress site with hostagator web hosting , I am buying new domain and want to use new domain for site but same existing developed si

相关标签:
4条回答
  • 2021-01-28 14:22

    Solution is here

    after searching a lot i got one simple solution. Using Duplicator plugins or any other tool is either difficult or paid.

    My simple solution is as follows

    1. Backup and download all data from public html folder
    2. Download the SQL database associated with the wordpress site.(in phpMyadmin you will find option of export database.)
    3. Now upload the same files of public html folder to the public html folder of new hosting.
    4. create a database with same name and import the tables from the downloaded SQL database.(in phpMyadmin you will find option of import.)

    5. Now check the site if the domain is not changed

    If you are changing domain name too by keeping the website same you need to follow few more steps

    Download and place the interconnet/it tool in public html folder and follow the steps in documentation to use this tool.

    case1- you are transferring site from one domain to another

    if you are transferring from abc.com to xyz.com ins search and replace tool replace abc.com string with xyz.com .

    case2- if you are changing the names only in website

    if you are keeping the domain same but changing name of site e.g. ABC Technologies to XYZ technologies . Then replace ABC to XYZ

    You can use this tool as per your need as it is applicable for database too.

    0 讨论(0)
  • 2021-01-28 14:28

    Just install WP migrate db plug-in in your current website. And export the database with your new URL. Then create a new database in your server and import the updated SQL file. Then edit your config.php with new database details. Finally point your new domian to this server **should take complete backup (both files and databse) before making the above changes **

    0 讨论(0)
  • 2021-01-28 14:31

    Here I will explain how to take back up manually and restore manually on another server with other domain name. Backup: You need to take back up of site and database.

    For site, you can take only back up of wp-content. It contains all data you need to resore. STEP1 : cpanel-file manager-public html- (wp-content)- compress & save- export or download zip file. For database: phpmyadmin -> export databse. This gives you localhost.sql file.

    These two files one .zip file and another .sql file are your back up. (It is good to remember user id password of wordpress dashboard of this one)

    Restore in another server on another domain:

    After you get you new domain dns propagated on new server, open its cpanel. Run wordpress script , see database name it is creating. 1) database restore: MyphpAdmin->Database created by wordpress->check all tables->drop all tables. Now your database is clean without any table.

    In your loacalhost.sql file remove two piece of codes: a)any signature like this (it should be on top) -- phpMyAdmin SQL Dump -- version 4.8.5

    -- https://www.phpmyadmin.net/

    -- Host: localhost:3306 -- Generation Time: Oct 14, 2019 at 09:45 PM -- Server version: 5.6.45 -- PHP Version: 7.2.7

    b) Code prompting creating a new database like this:

    -- Database: soniasin_fitfoody

    CREATE DATABASE IF NOT EXISTS soniasin_fitfoody DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci; USE soniasin_fitfoody;

    -->Now, go to import and import, select your back up .sql file-> go. It will import all tables in your this database. --> There is a database table now like wp_option, go there & edit siteurl (keep your new domain name), home (keep your new domain name) and admin email id.Very important. Site Restoration:

    1) Go to public html folder. Remove directory wp-content. 2) Import your back .zip file here and unzip. 3) You will find on wp-config.php file in public html folder, open it and update table prefix. $table_prefix = 'wp_'; Here yo have to see what is your table prefix. Check database tables and see what prefix is in all tables. Here in this example it was 'wp_' , therefore kept it. 4) Now log in to you wordpress dashboard. It will take username of old site now and should take old password too. In case you forget password, change it and then open. Now wordpress will confirm that your database is changed, say ok and proceed. Your site should be running on new URL now on another server.

    In case of doubt, you ask me. If one want to watch any video here goes the link https://youtu.be/wROa37k_RQA.

    0 讨论(0)
  • 2021-01-28 14:38

    There are a lot of ways of doing that. You can search a lot of materials on Internet but I would advise you to use this tool because I used in the past and it's reliable and very straightforward.

    It is called Duplicator and is a wordpress plugin solution: https://wordpress.org/plugins/duplicator/

    Consider to maintain your site active until your new site is working properly. I hope I could help you. Regards.

    0 讨论(0)
提交回复
热议问题