Skip to main content
Share Your Experience: Take the 2024 Developer Survey
21 votes
Accepted

Magento2 - local / staging / production deployment & gitignore

In fact, every day I am less convinced about the utility of Magento 2 production mode, unless you are not going to change anything in the project. Can you change my mind? I'm not sure if I understand ...
Fabian Schmengler's user avatar
15 votes
Accepted

How to manage config.php in Magento 2

First of all, very good question. But...I don't agree with this: The problem is when someone install the project he doesn't have this file but he already have the database so he can't run bin/...
Marius's user avatar
  • 198k
14 votes
Accepted

app/etc/config.php in VCS or not

There's nothing wrong with including config.php in VCS if your needs are based on configuration being the same across various environments, especially the on/off states of your modules. The side ...
mkotov's user avatar
  • 416
8 votes
Accepted

How to secure Magento version control systems

In .htaccess on your server config file. (1) RewriteEngine on RewriteRule "^(.*/)?\.git/" - [F,L] And (2) RedirectMatch 404 /\.git Place this both method in .htaccess file. It hides any file or ...
Adit's user avatar
  • 96
6 votes

Magento 2 .gitignore template for new project

I normally use the following website to generate my gitignore: https://www.gitignore.io/
lky's user avatar
  • 797
6 votes
Accepted

Autoload error: Vendor autoload is not found. Please run 'composer install' under application root directory in Magento 2

Actually your vendor is empty, because it always added in .gitignore. To resolve this follow these steps Download and install composer for windows Run CMD and go to your project directory Run ...
Shoaib Munir's user avatar
  • 9,482
5 votes

Magento2 - local / staging / production deployment & gitignore

To my mind, wait Magento 2.2 or try to implement a similar approach. Magento 2.2 introduces pipeline deployment by for example separating build server with production server. Here is the official ...
Franck Garnier's user avatar
5 votes
Accepted

Module development workflow with GIT and modman

It gives me a weird icon (like it doesn't know if it's a file or a folder): It's a broken git submodule. This happens if you accidently commit a directory that contains a .git directory. To prevent ...
Fabian Schmengler's user avatar
5 votes

Magento 2 and git, best practice for custom module development

You can add the local path to the module you'll be distributing to your composer.json. You can then work either in the vendor directory or in the path you've defined. Example: composer.json "...
Adam Paterson's user avatar
4 votes
Accepted

How to set up .gitignore for a fresh Magento 2 (v2.2.0) site?

I used below file to manage project in git /.buildpath /.cache /.metadata /.project /.settings /.vscode atlassian* /nbproject /robots.txt /pub/robots.txt /sitemap /sitemap.xml /pub/sitemap /pub/...
Vaibhav Ahalpara's user avatar
4 votes
Accepted

Magento 2 - AWS automatic codeDeploy via GitHub webhook

This is a very "BIG" topic but I will cover the basics here ASSUMING YOU ALREADY HAVE an AWS account and CodeDeploy setup Here are the basic that we take on a deployment for M2 Here is the appspec....
brentwpeterson's user avatar
3 votes

Magento2 : Committing vendor folder in Git Repository

That depends on your deployment strategy For instance, we never run composer in staging or production servers, so any composer update or install of new packages are always done in developers local ...
Raul Sanchez's user avatar
  • 3,125
2 votes
Accepted

Is it possible to install using checkout from existing SVN?

My experience is with Magento V1. I don' know how much has changed in V2. I have been using a SVN method of keeping our live site up to date for about a year now. I have a separate URL for the ...
Kane Shaw's user avatar
  • 315
2 votes
Accepted

Deploy Magento 2 website on Staging server and Composer

Why shouldn't I do this via ssh on the server with php composer.phar install ? That is exactly what you should do. Composer will install your dependencies for you at the specific version you ask for....
scrowler's user avatar
  • 2,014
2 votes

What is the preferred structure of a Magento 2 project under VCS?

Unfortunately the accepted answer, although being the way originally intended to achieve the desired goal, only work for excluding files and directories placed in the root, because if we want to ...
Gennaro Vietri's user avatar
2 votes
Accepted

What is the preferred structure of a Magento 2 project under VCS?

Ok, looks like I found a better solution for what I was trying to achieve. In the composer.json, it is possible to specify which files should be ignored by the Magento Composer Installer. If I don't ...
fmrng's user avatar
  • 3,398
2 votes
Accepted

Managing M2 projects with GIT (workflow)

You can sync all the images between local and production with Rsync (Tutorial: https://www.digitalocean.com/community/tutorials/how-to-use-rsync-to-sync-local-and-remote-directories-on-a-vps) . ...
Tjitse's user avatar
  • 1,310
2 votes

GIT deployment and what files are required in production environment

I suggest you read some articles about processes already used by some, such as : https://www.c3media.co.uk/blog/magento/deploying-magento-2-production-environment/ https://www.c3media.co.uk/blog/c3-...
DependencyHell's user avatar
2 votes
Accepted

Instructions to update extension in Magento 1.9

Unzip the new version of extension Check the files if they are added in correct order (app , skin , js) cp -rf unzipedextension/* your-magento-root/ (in your terminal) clean / flush cache. logout/...
Ylgen Guxholli's user avatar
2 votes
Accepted

Is there a good way to ignore comment-only changes in Magento version upgrades?

Ever since Magento version 2.2.0, Magento no longer incorporates the current year in their copyright notices. Magento backported this into version 2.1.13 as well.
Jason Carter's user avatar
2 votes
Accepted

How to install git patch of Authorize.net Direct Post Signature Key?

Now Apply Patch directly in vendor folder This patch is applicable on all Magento 2.x and 1.x versions. Alternatively you can use patched files from following address and replace them in your vendor ...
Jugal Kishor's user avatar
  • 1,225
2 votes
Accepted

Magento 2 files to keep in repository

What is necessary to keep in a repository in the context of Development System Setup of Pipeline Deployment is the default .gitignore that you are using. There are also build and production ...
Barry's user avatar
  • 587
2 votes

Magento 2: I want to clone the Media folder as well while cloning the Magento 2 GIT repository

For this you can open git repo url and check if media folder is available in git repository ? If not available than ask administrator to commit in new branch and you can take a pull of that branch. ...
ParulThakkar's user avatar
  • 1,147
2 votes
Accepted

How to stash a single untracked file out of a group of hundreds of both modified and untracked files in the git?

Sometime if we change files and folder permission than also shows as modified files so can you try with first this command ? git config core.filemode false And than for stashing single file you can ...
ParulThakkar's user avatar
  • 1,147
2 votes
Accepted

How to clone directly from Magento Cloud?

You can try to run this command below, dont' forget to use your project id and the environment name. magento-cloud get bkyvkcoafe -e production But if you're not able to do it you can clone using ...
Rafael Corrêa Gomes's user avatar
2 votes

How to create an Integration environment in Magento Cloud?

Step 1 :- Checkout to Staging Branch git checkout staging Step 2 :- Create a Integration Brach git checkout -b integration Step 3 :- git add . && git commit -m "Integration Environment ...
Basant Mandal's user avatar
1 vote

Magento2 : Committing vendor folder in Git Repository

One of the ideas presented that works is to commit the entire vendor directory and make the changes to the file and commit to the repo. Lets analyze this for a moment. It works and on deployment the ...
Prashant Valanda's user avatar
1 vote
Accepted

Testing Pull Requests and Patches from Magento 2's GitHub

Unfortunately, those two installation methods are largely incompatible. So your best option is probably to set up a second instance based on GitHub. If you want to permanently add core bugfixes to a ...
Fabian Schmengler's user avatar
1 vote

Magento 1.9.3.7 / SUPEE-10415: PHP "Cannot redefine" and "Cannot redeclare" errors after merge

unserialize If you have this problem, there should be two declarations of unserialize in app/code/core/Mage/Core/Helper/String.php. Remove the top one, it should be on or near line 84. This way you ...
Toon Spin's user avatar
1 vote

Magento 2 Version Update Dilemma (Cloned from Git Repo)

You can install Magento2 with composer and git, you see below example links: Magento Install without Sample Data. Magento Install with Sample Data.
St3phan's user avatar
  • 2,907

Only top scored, non community-wiki answers of a minimum length are eligible