Support » Fixing WordPress » Lost some complex formatting when transferring servers

  • Resolved Marie0930

    (@marie0930)


    We recently moved our company website from an externally hosted server to an on-site server through our in-house IT department. I backed up our wordpress website via FTP and Backup Buddy to be safe.

    We are wanting to recreate the site on our sandbox site so that we can make some visual changes. However, when I upload the site to our sandbox site there are some formatting differences. Everything is copied exactly via FTP so what could be causing these formatting issues?

    Thanks!

Viewing 15 replies - 16 through 30 (of 49 total)
  • if your FTP was moved exactly as you say it must be related to the domain or url change which must be done a certain way in WordPress and if not done correct can cause all kinds of “wonky” errors 🙂

    That works!! So how would I go about finding these div IDs to change them?

    Moderator Andrew Nevins

    (@anevins)

    Forum moderator

    Are you responding to Alvaw?

    The “That Works!” was directed towards Andrew. Changing the div IDs fixed the formatting errors. Now it is finding those in the files to change.

    Alvaw- I have actually done what you stated to no avail.

    So yes Andrew…..changing the div IDs in Chrome did the trick. It is perfect now. So the question I have now is how do I find and change these IDs on the site itself?

    Moderator Andrew Nevins

    (@anevins)

    Forum moderator

    As you’re struggling to find the <div> elements, you could add ID values using jQuery in your footer.php file.
    Are you familiar with jQuery? If not, you may need to http://PasteBin.com your HTML and CSS, and link us the PasteBin page.

    I am not very familiar with JQuery; however, the site developer used it a lot.

    I just looked at the PasteBin.com. How exactly does that work? Thanks so much for all your help.

    1. Create an FTP backup of the live WordPress site before any changes are made.
    2. Login to PHP my admin on the live WordPress website and select your database name on the left, then click on export above, and then click the save as file type in the lower left and then click go and save this to your desktop.
    3. Open the .SQL file from step #2 in a text editor and then search for “youroldsite.com” and replace all instances with “SANDBOXsite.com” and then save this .sql file again on your machine. and be sure not to include WWW or http:// in the text replacement
    4. Create a new MySQL database on the SANDBOX server, login to PHPmyAdmin and click the import tab above and import your .sql file with the new URL from step #3
    5. Update the wp-config.php file from the FTP backup in step #1 with the new database name, password, username, and database host.
    6. Upload the FTP files to the SANDBOX and then visit the URL and all should be OK and you can smile, however you may need to reset permalinks.

    The reason im saying all this is because I move hundreds and hundreds of these and although plugins can cuase some seriously weird issues like you have here
    in my experience its the moving and changing of names that causes the issues and if done correctly WordPress should function as on the live site. Doing all those
    other changes is a risk and does not sound right to me. So take it or leave it, but I would give it a shot. Also this does not involve using anything with Backup Buddy so disable that before starting this process on the live site.

    sorry for all that! didnt refresh but you can do a search and replace on your php files in a text editor to fix that probably if that is the only issue now.

    Moderator Andrew Nevins

    (@anevins)

    Forum moderator

    If the above technique doesn’t work,
    Within your footer.php file, just before the </body> element, could you try adding;

    <script type="text/javascript">
    jQuery(document).ready(function($) {
    
     // Within this bit, $('') you need to add the <div> elements that you want the id attached to.
     // You can use multiple selectors and here's a tutorial how http://api.jquery.com/multiple-selector/
    
     $('').attr('id', '');
    
     // Within this bit, ('id', '') you need to add within the second apostrophes the actual ID value,
     // you can only add one value. E.g ('id', 'text 10')
    }
    </script>

    Here’s a resource on jQuery attr function
    http://api.jquery.com/attr/

    alvaw,

    Yes I did everything as outlined in your steps. I did that as well as secured a copy via backupbuddy. It ended up wonky. Literally all links have been changed to the new site…everyone. The literal only difference in the two sites (aside from links now reading…sandbox instead of old site) is the div IDs. Literally the ONLY thing different. It makes now sense and I have moved sites before with absolutely no issue.

    It seems that for whatever, the plugins utilized are causing some major issues when transferred. When I changed the div ID tags via the Chrome tool it looked perfect, so I am willing to give it a shot as what you outlined above is exactly what I did originally.

    And I have searched all the PHP files and can not find them. This is literally the wackiest thing I have seen.

    I am going to give Andrew’s method a shot and will update.

    try disabling the plugin and then moving the site and then reenabling, and some of those plugins have an export settings feature, ensure that is not there, but again a search and replace inside of your page.php or singlepage.php or post.php or any php file could change these quickly perhaps and in bulk.

    Okay I tried the find first and nothing. I did see that there is an area where div id is defined like the following:

    div id=”inner” <–could this be pulling the “text-1, text-2, text-3, ect” from somewhere?

Viewing 15 replies - 16 through 30 (of 49 total)
  • The topic ‘Lost some complex formatting when transferring servers’ is closed to new replies.