WordPress.org

Ready to get started?Download WordPress

Forums

Copy an exact WordPress site to another domain (11 posts)

  1. Andy Hawkins
    Member
    Posted 3 years ago #

    Hi, I have a question regarding a task that you may have the answer to, as you guys probably have solved such problems in the past :-)

    I have a WordPress site with custom design (with TwentyTen Theme as the core). This WP site has also a lot of contents when it comes to menus, plugins, widgets, images (both stand alone and/or organized with NextGEN Gallery gallery plugin), Flash Image Slider Plugin and more.

    Furthermore I've made this WordPress to act like a fully functional website with a blogpart as an addition. So it have a lot more pages than posts. I have also made some changes regarding some of the php pages just to implement stuff like flash scripts and so. In addition I've made a lot of the stand alone images clickable using the text widget.

    I guess I could copy everything including the database and put it on the new site. But because this is a huge job and I don't want to fail are there any particular issues that i should consider as special?

    Hope you can give good advices and help regarding this.

    Thank you in advance!

    /Andy

  2. jonradio
    Member
    Posted 3 years ago #

    Moving a WordPress web site is quite well documented here:
    http://codex.wordpress.org/Moving_WordPress

    As for specific advice, you didn't mention whether the domain name is changing or not.

    If not, it really is just as simple as copying all the files and the database. To avoid FTP transmission errors and such, I have had more luck with compressing all the files into a single .tar.gz file then FTP'ing that to my computer and to the new web site, where I expand it.

    Personally, I use cPanel (the most popular web hosting customer account/web site management tool). Their Backup and Restore for the database. And their File Manager's Compress and Expand to work with the .tar.gz

    Changing domain names significantly complicates matters. I use the Search and Replace plug-in to handle hard-coded URLs.

  3. Andy Hawkins
    Member
    Posted 3 years ago #

    Adiant, thanks for your answer,

    ...regarding domain name it will change

    I have a website that I want to duplicate to four different domains. It will be four languages with a website for each of them. I want the exact same content on each of them with an exception of translated text.

    I wish I could use cPanel for these jobs but unfortunately my friend who own these sites ordered from a host that not have cPanel.

    But after all if it is a straight forward process to duplicate my main site with all content and database to the four different domains I will do that.

  4. jonradio
    Member
    Posted 3 years ago #

    If you can't easily create a .tar.gz of all the files, at least use a reliable FTP client like FileZilla that is pretty diligent about re-doing failing file transfers. But, even with FileZilla, I've seen people burned because they don't look at the Failed Transfers tab for files that never made it.

    Likewise with the database backup and restores. Check all of them to be sure they are complete. phpMyAdmin on the host and 7Zip on your computer can really help.

  5. Andy Hawkins
    Member
    Posted 3 years ago #

    adiant, hmmm I'm just wondering of what you try to tell me above....

    you say:

    As for specific advice, you didn't mention whether the domain name is changing or not.

    If not, it really is just as simple as copying all the files and the database.

    ... but that is the case here. I want to change the domain names to four different ones with a language for each of them as I told above. So it will not be simple if I understand you right?

    So what are the challenges that I have to deal with here?

    /Andy

  6. jonradio
    Member
    Posted 3 years ago #

    As I say, the documentation in the Codex that I referenced is really quite good.

    The challenges are in getting all the URL changes made within your WordPress site:

    1. two places in the WordPress database, in the wp_options table, the siteurl and home entries
    2. refresh Permalinks by hitting the Save button
    3. use the Search and Replace plug-in to change all hard-coded URLs in posts, pages and anywhere else.

    That should cover it.

  7. Andy Hawkins
    Member
    Posted 3 years ago #

    I chose to go further with this thread...

    I have an important issue going on right now. I am moving a WordPress site right now using the BackupBuddy plugin. I'm wondering if there is a chance that my coded url's can be changed? I have a lot of text-widgets where I have put in some url's. I decided as mentioned to move the whole thing to a brand new domain. Do I have to go inside every text-widget to change the hardcoded url or is there a tool which can do the job for me? I don't know if BackupBuddy Plugin can do this. And I don't know if these hardcoded url's is stored in the database somewhere. If so, I believe that this job can be easy done.... on the other hand, the job can be painful and boring.

  8. jonradio
    Member
    Posted 3 years ago #

    The above mentioned Search and Replace plug-in has always done the job for me: changing URLs. Typically, I use it to build cloned test sites, where the URLs change from http://domain.com/folder/file.jpg to http://webhoster.com/~username/folder/file.jpg.

    But, as the documentation for the plug-in says, make sure you get the Search and Replace strings correct or you'll have a real mess on your hands. Which means, database backup first!

    Search and Replace only takes care of database-resident URLs. Other than wp-config.php, I'm hard pressed to think of any URLs in files that I've ever run into.

  9. artcoder
    Member
    Posted 3 years ago #

    The contents of the text widget is saved to the wordpress database (not to files). So the safest way is to manually change the hard-coded URLs in the widget after the migration.

    But if you find that too time-consuming and if you are technically inclined to do so, you can alternatively do a search and replace of the hard-coded URLs in the database backup file (the SQL file).

    As for not being able to compress your site files using cPanel, you can write a simple PHP script that will compress your site files for easy download as shown in this tutorial.

  10. shaildeogam
    Member
    Posted 3 years ago #

    I also have a similar issue. I would like to make my website, but don't want to show it until it is completed. So, I want to create a test website first. Lets say http://www.xyz.com/test. I will first create a test folder then create a complete website there. When it is all done, I will transfer the content to the actual website. I don't know how to deal with the URLs on the database.

    Please help me on this issue.

    Thanks in advance.

    Shail

  11. jonradio
    Member
    Posted 3 years ago #

    I believe that my last posts in this thread should solve your problem: database, Permalinks and the Search and Replace plug-in.

    As I say, that's all I've ever needed.

Topic Closed

This topic has been closed to new replies.

About this Topic