Answers.Body: <p>Are you sure you're looking at the complete source code for the website? If you just have access to the production site, it's possible it may be missing source files, like the composer files. Not all deployment systems include the entire source code. If the site has been deployed using a build system that builds in a virtual machine – like <a href="https://github.com/features/actions" rel="nofollow noreferrer">GitHub Actions</a> – and then uploads just the relevant build artefacts (like the vendor folder), those source files will never reach the production environment. If this is a case, there may be more files missing. For example, if the site includes a build step for JS / CSS assets and the production environment only includes minified assets, it will be nearly impossible to continue to develop the site without access to the original files.</p>
  <p>First, do whatever it takes to get hold of the last developer who worked on the site. Ask them for access to the git repository, if it exists, or even just a zip file of their development version of the site. It's likely that those will include the files you're looking for.</p>
  <hr />
  <p>If the <code>composer.json</code> and <code>composer.lock</code> files are really missing, you're going to have to reproduce them to be able to update the site cleanly and completely. Before you get started, take a full backup of the entire site, including the database, and install it in a local development environment.</p>
  <p>You can use the <a href="https://github.com/craftcms/craft/blob/main/composer.json" rel="nofollow noreferrer"><code>composer.json</code> in the Craft project template</a> as a starting point. Enter all the plugins you can see in the backend to the <code>require</code> section. Then go through the <code>vendor/</code> folder and check every package. For every package in there, check if it's already installed as a dependency of Craft or one of the plugins (<a href="https://getcomposer.org/doc/03-cli.md#depends-why" rel="nofollow noreferrer"><code>composer why</code></a> can help with this). If it isn't, check if the site actually needs it. If so, add it to the <code>require</code> section of the <code>composer.json</code> as well. If not, you can safely remove it. Finally, remove the <code>vendor/</code> folder and run <code>composer install</code>, then check if everything works correctly. If not, compare the vendor folder to the one from the backup to see what's missing.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-03-07T04:56:23.813Z
Answers.Text: Also - just in case your site was setup in a custom folder setup, take a look around in the root directory of the project for a composer.json file. 
  
  If there is another developer also working on the project, see if they have a copy on their local setup.
Answers.UserDisplayName: cherrykoda
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-03-06T16:01:54.970Z
Answers.LastActivityDate: 2023-03-06T16:01:54.970Z
Answers.UserDisplayName: MoritzLost
Body: <p>I don't know the history of this site.  Though it has a bunch of plugins and a custom module.  I tried removing the vendor folder and running composer install.  Though at this point I am flailing.  I presume I need to create a fresh install folder and copy the data into it?  Thanks!</p>
  
Tags: <updates>
Title: How would I upgrade a Craft 3.4.3 site that has no composer.json file?
ThreadText: # How would I upgrade a Craft 3.4.3 site that has no composer.json file?
  
  (Asked by: username_0 on 2023-03-04)
  
  I don't know the history of this site. Though it has a bunch of plugins and a custom module. I tried removing the vendor folder and running composer install. Though at this point I am flailing. I presume I need to create a fresh install folder and copy the data into it? Thanks!
  
  **Tags:** updates
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2023-03-06. Score: 2
  
  Are you sure you're looking at the complete source code for the website? If you just have access to the production site, it's possible it may be missing source files, like the composer files. Not all deployment systems include the entire source code. If the site has been deployed using a build system that builds in a virtual machine – like [GitHub Actions](https://github.com/features/actions) – and then uploads just the relevant build artefacts (like the vendor folder), those source files will never reach the production environment. If this is a case, there may be more files missing. For example, if the site includes a build step for JS / CSS assets and the production environment only includes minified assets, it will be nearly impossible to continue to develop the site without access to the original files.
  
  First, do whatever it takes to get hold of the last developer who worked on the site. Ask them for access to the git repository, if it exists, or even just a zip file of their development version of the site. It's likely that those will include the files you're looking for.
  
  ---
  
  If the `composer.json` and `composer.lock` files are really missing, you're going to have to reproduce them to be able to update the site cleanly and completely. Before you get started, take a full backup of the entire site, including the database, and install it in a local development environment.
  
  You can use the [`composer.json` in the Craft project template](https://github.com/craftcms/craft/blob/main/composer.json) as a starting point. Enter all the plugins you can see in the backend to the `require` section. Then go through the `vendor/` folder and check every package. For every package in there, check if it's already installed as a dependency of Craft or one of the plugins ([`composer why`](https://getcomposer.org/doc/03-cli.md#depends-why) can help with this). If it isn't, check if the site actually needs it. If so, add it to the `require` section of the `composer.json` as well. If not, you can safely remove it. Finally, remove the `vendor/` folder and run `composer install`, then check if everything works correctly. If not, compare the vendor folder to the one from the backup to see what's missing.
  
  > **Comments:**
  > **username_2**: Also - just in case your site was setup in a custom folder setup, take a look around in the root directory of the project for a composer.json file.   If there is another developer also working on the project, see if they have a copy on their local setup.  
  
  ---
  
  