Answers.Body: <ol>
  <li>Make sure you have <a href="https://getcomposer.org/doc/00-intro.md#installation-linux-unix-macos" rel="nofollow noreferrer">Composer installed</a> from the command line.</li>
  <li>Open your project's composer.json file.</li>
  <li>Find the &quot;require&quot; section. Similar to:</li>
  </ol>
  <pre><code>&quot;require&quot;: {
      &quot;craftcms/cms&quot;: &quot;^3.6.4&quot;,
      &quot;vlucas/phpdotenv&quot;: &quot;^3.4.0&quot;
  },
  </code></pre>
  <ol start="3">
  <li>Edit the <code>craftcms/cms</code> line to the exact version you want. For example 3.5.0.</li>
  </ol>
  <pre><code>&quot;craftcms/cms&quot;: &quot;3.5.0&quot;,
  </code></pre>
  <ol start="4">
  <li>Run <code>composer update</code> from the CLI from your project's root and that will pull in a fresh set to Craft 3.5.0 files.</li>
  </ol>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-04-20T00:10:52.510Z
Answers.Text: Thanks for engaging an answer... I'm still confused.  I've installed it locally, but I don't see a composer.json file anywhere?
Answers.UserDisplayName: RocksaltAU
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-04-20T02:09:22.750Z
Answers.Text: @RocksaltAU You should be able to find the `composer.json` file at the root of your project. It’s a required file and there’s no way you wouldn’t have one, unless someone manually deleted it accidentally. If you don’t have it, you can use [this](https://github.com/craftcms/craft/blob/main/composer.json.default) as a starting point (but rename it to lose the `.default`). You’ll need to reinstall all of your plugins after you run `composer update` using that file, though.
Answers.UserDisplayName: Brandon Kelly
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-04-22T00:44:31.863Z
Answers.Text: I have done this, but when I launched the setup, it still upgraded to the lastest version of craft.  I must be triggering the setup process incorrectly?  -- actually, I've downloaded the version of craft cms into a folder, but the composer.json doesn't have the require craftcms/cms line at all.  It simply has a version number at the top of json.
Answers.UserDisplayName: RocksaltAU
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-04-22T23:27:22.910Z
Answers.Text: Can you share a screenshot of your composer.json file?
Answers.UserDisplayName: Brad Bell
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-04-22T23:42:33.137Z
Answers.Text: `{
    "name": "craftcms/cms",
    "description": "Craft CMS",
    "version": "3.6.7",
    "keywords": [
      "cms",
      "craftcms",
      "yii2"
    ],
    "homepage": "https://craftcms.com",
    "license": "proprietary",
    "support": {
      "email": "support@craftcms.com",
      "issues": "https://github.com/craftcms/cms/issues?state=open",
      "forum": "https://craftcms.stackexchange.com/",
      "source": "https://github.com/craftcms/cms",
      "docs": "https://craftcms.com/docs/3.x/",
      "rss": "https://github.com/craftcms/cms/releases.atom"
    },
    "require": {
      "php": ">=7.2.5",`
Answers.UserDisplayName: RocksaltAU
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-04-22T23:43:03.720Z
Answers.Text: Thats the composer file from the downloaded zip file for the old version of composer
Answers.UserDisplayName: RocksaltAU
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-04-22T23:43:56.860Z
Answers.Text: When I ran the composer project setup from the folder this file is in, it still installed the latest version of craft.
Answers.UserDisplayName: RocksaltAU
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-04-19T23:32:29.063Z
Answers.LastActivityDate: 2021-04-19T23:32:29.063Z
Answers.UserDisplayName: Brad Bell
Body: <p>I'm trying to install a non-current version of Craft 3, and several pointers on using composer to do this say to &quot;update the composer.json&quot; line with the version you want.</p>
  <p>Can someone please explain exactly where this file should be, and/or the steps to do this, as I cannot make head-nor-tail of this process.</p>
  <p><a href="https://craftcms.stackexchange.com/questions/223/where-can-i-download-previous-versions-of-craft">Where can I download previous versions of Craft?</a></p>
  <p><a href="https://craftcms.com/knowledge-base/downloading-previous-commerce-versions" rel="nofollow noreferrer">https://craftcms.com/knowledge-base/downloading-previous-commerce-versions</a></p>
  
Tags: <installation><composer>
Title: Where exactly to update the composer.json to install an older version of Craft 3?
ThreadText: # Where exactly to update the composer.json to install an older version of Craft 3?
  
  (Asked by: username_0 on 2021-04-19)
  
  I'm trying to install a non-current version of Craft 3, and several pointers on using composer to do this say to "update the composer.json" line with the version you want.
  
  Can someone please explain exactly where this file should be, and/or the steps to do this, as I cannot make head-nor-tail of this process.
  
  [Where can I download previous versions of Craft?](https://craftcms.stackexchange.com/questions/223/where-can-i-download-previous-versions-of-craft)
  
  <https://craftcms.com/knowledge-base/downloading-previous-commerce-versions>
  
  **Tags:** installation, composer
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2021-04-19. Score: 1 | Accepted answer
  
  1. Make sure you have [Composer installed](https://getcomposer.org/doc/00-intro.md#installation-linux-unix-macos) from the command line.
  2. Open your project's composer.json file.
  3. Find the "require" section. Similar to:
  
  ```
  "require": {
      "craftcms/cms": "^3.6.4",
      "vlucas/phpdotenv": "^3.4.0"
  },
  
  ```
  
  3. Edit the `craftcms/cms` line to the exact version you want. For example 3.5.0.
  
  ```
  "craftcms/cms": "3.5.0",
  
  ```
  
  4. Run `composer update` from the CLI from your project's root and that will pull in a fresh set to Craft 3.5.0 files.
  
  > **Comments:**
  > **username_0**: Thanks for engaging an answer... I'm still confused.  I've installed it locally, but I don't see a composer.json file anywhere?  
  > **username_2**: @username_0 You should be able to find the `composer.json` file at the root of your project. It’s a required file and there’s no way you wouldn’t have one, unless someone manually deleted it accidentally. If you don’t have it, you can use [this](https://github.com/craftcms/craft/blob/main/composer.json.default) as a starting point (but rename it to lose the `.default`). You’ll need to reinstall all of your plugins after you run `composer update` using that file, though.  
  > **username_0**: I have done this, but when I launched the setup, it still upgraded to the lastest version of craft.  I must be triggering the setup process incorrectly?  -- actually, I've downloaded the version of craft cms into a folder, but the composer.json doesn't have the require craftcms/cms line at all.  It simply has a version number at the top of json.  
  > **username_1**: Can you share a screenshot of your composer.json file?  
  > **username_0**: `{   "name": "craftcms/cms",   "description": "Craft CMS",   "version": "3.6.7",   "keywords": [     "cms",     "craftcms",     "yii2"   ],   "homepage": "https://craftcms.com",   "license": "proprietary",   "support": {     "email": "support@craftcms.com",     "issues": "https://github.com/craftcms/cms/issues?state=open",     "forum": "https://craftcms.stackexchange.com/",     "source": "https://github.com/craftcms/cms",     "docs": "https://craftcms.com/docs/3.x/",     "rss": "https://github.com/craftcms/cms/releases.atom"   },   "require": {     "php": ">=7.2.5",`  
  > **username_0**: Thats the composer file from the downloaded zip file for the old version of composer  
  > **username_0**: When I ran the composer project setup from the folder this file is in, it still installed the latest version of craft.  
  
  ---
  
  