For the last few weeks, I've been noticing the speed of my web browsing grinding to a halt, and have good reason to suspect Firefox is the culprit of this. This is despite being on the Release (i.e. stable) edition and always keeping it updated to the latest version.

Firefox recommends a Refresh for issues such as this - the problem with a Refresh, however, is that it means all of the extensions and preferences I've accumulated, customised and refined over several years will be lost:

These items and settings will be removed:

Extensions and themes, website permissions, modified preferences, added search engines, DOM storage, security certificate and device settings, download actions, plugin settings, toolbar customizations, user styles and social features will be removed.

From: Refresh Firefox

How can I perform a Firefox Refresh without losing all of this data, and with it, a significant part of my browsing experience?


Firstly, note that there's good reason a Firefox Refresh removes your extensions and preferences - these are usually the most likely cause of problems like slowness and bugs encountered in Firefox.

This means that Refreshing Firefox and immediately restoring everything from your old, affected user profile may leave you with a refreshed profile that suffers from the same issues. Therefore, if you can afford the inconvenience, building Firefox from scratch all over again is a more superior, leaner option to importing old data.

That said, a Refresh once all of your data is backed up can't hurt, and can be the quickest method for eliminating problems. If, after restoring your old data after a Refresh, you still notice the same problems occurring, simply try another Refresh without copying the data, or by copying it pieces at a time, so as to isolate the true cause of the issues.

Backing up your Firefox profile

A Firefox Refresh creates a brand new user profile with only the most essential data, and by default, moves your old user profile (and with it, all of your data) to a folder called Old Firefox Data on your Desktop. This will almost always be sufficient, but just in case this folder isn't created, you can go ahead and create a secondary backup by following the steps below.

You'll need to navigate to the folder where your current Firefox profile is stored. To do this, click Help > Troubleshooting Information from the Firefox menu bar. Look for the Profile Folder field under the Application Basics header, and click Open Folder.

In the folder that opens, make a note of the name of the user folder that you're in, then use your file manager to go one directory up. Here, there'll be two or more folders - one for each of the user profiles that currently exist for your installation of Firefox, plus a default one. Often, if you've had Firefox for a reasonably long time, it can accumulate several user profiles. Copy the user folder you were previously in to your Desktop or somewhere else inside of your user folder to back it up.

Refreshing Firefox

Follow the instructions here to Refresh Firefox.

Once the Refresh has completed, Firefox will tell you what was imported. This should include your:

  • Bookmarks (stored in the places.sqlite file)
  • Browsing and download history (stored in the places.sqlite file)
  • Passwords and logins (stored in the key4.db and logins.json files)
  • Open windows and tabs (stored in the sessionstore.jsonlz4 file)
  • Cookies (stored in the cookies.sqlite file)
  • Web form auto-fill information (stored in the formhistory.sqlite file)
  • Personal dictionary (stored in the persdict.dat file)

Everything not seen above will now be lost. If you've spent a decent amount of time customising your browsing setup, Firefox will now feel noticeably unfamiliar.

Restoring old extensions, preferences and data

You'll need to restore everything else for Firefox to behave like you expect it to again.

Navigate to your Desktop. If you see a folder called Old Firefox Data, you won't be needing the secondary backup of your user profile that you created earlier, and can safely delete it. Open the Old Firefox Data folder, and then the only user profile folder inside of it. You should now be looking at the full contents of your previous Firefox profile.

enter image description here

Now you'll need to navigate to the user profile newly created by the Refresh.

Open Firefox, and from the Menu Bar, click Help > Troubleshooting Information. In the Window that opens, click Open Folder next to the Profile Folder field.

You'll now need to transfer files and folders as needed from the old user profile in Old Firefox Data to this new one being used by Firefox.

What you copy over depends on what data you want to restore from your old profile. Key files and folders that contain data not already preserved by the Refresh are shown below.

  • The bookmarkbackups folder contains daily backups of bookmarks automatically created by Firefox, up to a maximum of 15 backups. Copy this folder if you expect to restore bookmarks from the last few weeks.

  • The browser-extension-data and extension-data folders contain the the data stored and used by extensions. I imagine a lot of, if not most, browser extensions would be pretty much useless without the data stored in these folders, so if you're planning to preserve extensions you should probably preserve these folders.

  • The chrome folder contains the userChrome.css file. Unless you've edited your userChrome.css and you want to keep the edits you've made, you don't need to copy this folder. Note that "chrome" here, and elsewhere in the inner workings of Firefox, refers to the term browser chrome, not Google Chrome.

  • The content-prefs.sqlite and permissions.sqlite files store Firefox permissions, such as which sites are allowed to display popups, or any custom zoom levels that have been set on sites.

  • The extensions folder contains all extensions installed for Firefox, including those marked as legacy after Firefox 57 (Quantum).

  • The handlers.json file stores preferences that tell Firefox what to do when it comes across a particular type of file, such as opening a PDF file with Acrobat Reader when you click on it.

  • The prefs.js and user.js (if present) files contain the bulk of user preferences, including any Firefox Options settings stored.

  • The search.json.mozlz4 file stores any custom search engines you've added to the Firefox Search bar.

  • The xulstore.json file stores toolbar and window size/position settings.

Ensuring Firefox is closed, copy any of the above as needed - using Shift + Click to select multiple items at once - paste them into the new Firefox user profile, and confirm any overwrites or merges when prompted.

Once done, and Firefox is re-opened again, it should look and behave exactly as it did before the Refresh - hopefully without the bugs that necessitated it in the first place.

References and Further Reading

1 https://support.mozilla.org/en-US/kb/profiles-where-firefox-stores-user-data
2 https://support.mozilla.org/en-US/kb/refresh-firefox-reset-add-ons-and-settings
3 http://forums.mozillazine.org/viewtopic.php?f=38&t=2938427&start=15

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.