Updating Bootstrap to version 3 - what do I have to do?

Twitter BootstrapTwitter Bootstrap-3

Twitter Bootstrap Problem Overview


I'm new to Bootstrap and have the older version 2.3.2.

Version 3 has been released. Do I just simply replace the CSS and Javascript files if I want to use the latest version?

Twitter Bootstrap Solutions


Solution 1 - Twitter Bootstrap

  1. Download the latest version from http://getbootstrap.com/ OR Replace the css and js files with the newest versions or use CDN (http://www.bootstrapcdn.com/)

  2. Migrate your html, yes indeed read http://bootply.com/bootstrap-3-migration-guide. You could try http://twitterbootstrapmigrator.w3masters.nl/ or http://code.divshot.com/bootstrap3_upgrader/ (provide checklist too) - https://stackoverflow.com/questions/17932509/images-not-responsive-by-default-in-twitter-bootstrap-3/17933207#17933207 - https://stackoverflow.com/questions/17128904/styling-twitters-bootstrap-3-x-buttons - https://stackoverflow.com/questions/18529274/change-navbar-color-in-twitter-bootstrap-3/18553876

  3. remove html5shiv cause TB drops support for IE7 and Firefox 3.x add html5shiv.js to add support of HTML5 elements to IE8

  4. add respond.js (https://github.com/scottjehl/Respond) for media query support in IE. NOTE this won't work with CDN, see: https://stackoverflow.com/questions/17947182/ie8-issue-with-twitter-bootstrap-3/17957495

  5. If you use Glyphicons, you will have to add them from http://glyphicons.getbootstrap.com/ ( icons have been moved to a separate repository.) Glyphicons are back since RC2 (180 glyphs in font format from the Glyphicon Halflings set)

  6. If you use the Javascript Typeahead component, you will have to integrate https://github.com/twitter/typeahead.js/ (cause typeahead javascript is dropped) See also: https://stackoverflow.com/questions/18167246/typeahead-problems-with-bootstrap-3-0-rc1/ Or use the "old" plugin: https://github.com/bassjobsen/Bootstrap-3-Typeahead, see also: https://stackoverflow.com/questions/18615964/ajax-call-in-bootstrap-3-0-typeahead/18620473

  7. Switch to the latest version of jQuery 1.x (don't use the 2.x version cause jQuery 2.x don't support IE8)

  8. If you use third party widgets which adds or insert html to your code (like addthis.com, sharethis.com and Google maps), create a wrapper for the box-sizing, see: https://stackoverflow.com/questions/17128730/right-border-of-the-addthis-counter-missing-with-twitters-bootstrap-3

Other:

Bootstrap 3 switch to box-sizing: border-box why?: https://stackoverflow.com/a/18858771/1596547

Note support for IE7 has been dropped. https://github.com/coliff/bootstrap-ie7 try to add the css part back with use of some conditional CSS.

Solution 2 - Twitter Bootstrap

Updated 2018

Bootstrap 3 to 4

Bootstrap 4 upgrade tool (this will help to migrate from Bootstrap 3 to 4)


Bootstrap 2 to 3

A release candidate (not the final release 3) for Bootstap 3 RC 1 was announced Friday (July 26 2013), so there is not yet any official migration guidance.

There are major changes for Bootstrap 3. There is no backwards compatibility with 2.x, so you can't just replace the files. You can however find some useful guidance here at Bootply:

http://bootply.com/bootstrap-3-migration-guide

There is also a Bootstrap migration tool in the works: https://github.com/iatek/bootstrap-migrate</strike>

Bootstrap 2.x to 3 upgrade tool: http://upgrade-bootstrap.bootply.com/v3

Solution 3 - Twitter Bootstrap

it is almost impossible to migrate from bootstrap 2.3 to 3.0. the version change is very drastic. I tried to update my zend framework 2 project with bootstrap 3.0 and the results was a mess (like trying to open with IE 5).

My advice: old project using bootstrap 2.X let with bootstrap 2.x. New starting project, start with 3.0.

In my opinion such version change was a very big error from bootstrap team. They should have done a gradual update 2.4, 2.5, 2.6 ....

Solution 4 - Twitter Bootstrap

I just migrated to 3.0.3 and this python app https://pypi.python.org/pypi/b2tob3/0.4 made it pretty easy task.

Solution 5 - Twitter Bootstrap

I made a grunt plugin to automate upgrading bootstrap 2.3 to 3.0 html.

Check it out at https://github.com/jdewit/grunt-html-upgrader

Solution 6 - Twitter Bootstrap

It's not sure but use this rereplacer joomla extension

refer this link,

http://www.nonumber.nl/extensions/rereplacer

otherwise, Template overrides are the only way to do this.

Solution 7 - Twitter Bootstrap

Two online tools to Upgrade to Bootstrap 3:

FROM bootply

FROM divshot

Solution 8 - Twitter Bootstrap

If you are having a big application with a lot of files with a lot of customization, every single tool likely that could not answer to most of the case you are facing.

First, of course, I recommend to try: https://pypi.python.org/pypi/b2tob3/0.4 but this won't answer to my need, I forked this version and adapt my own one to be able to migrate together Bootstrap 2 to 3 and Font Awesome 3 to 4 together, some cases that not treat in b23tob3-v0.4 (original one) are trying to treat in my version.

Read my post here: http://ask.osify.com/qa/589 Find my update in github: https://github.com/metrey/b2tob3 You can also find the compiled Windows app there as well to use right away.

ALWAYS backup your files and commit everything in to source control before using the tool.

Good luck and share your though.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionHenryView Question on Stackoverflow
Solution 1 - Twitter BootstrapBass JobsenView Answer on Stackoverflow
Solution 2 - Twitter BootstrapZimView Answer on Stackoverflow
Solution 3 - Twitter BootstrapalbanxView Answer on Stackoverflow
Solution 4 - Twitter BootstrapRameshView Answer on Stackoverflow
Solution 5 - Twitter BootstrapjdewitView Answer on Stackoverflow
Solution 6 - Twitter BootstrapKumar RamalingamView Answer on Stackoverflow
Solution 7 - Twitter Bootstrap令狐葱View Answer on Stackoverflow
Solution 8 - Twitter BootstrapOsifyView Answer on Stackoverflow