Replace these placeholders in all commands below with your actual values:
Use this when Magento runs on a remote server and you are running commands from your local machine (WSL/Linux/macOS).
Transfer the zip file from your local machine to the server.
scp -i <SSH_KEY> <LOCAL_ZIP_PATH> <SSH_USER>@<SERVER_HOST>:/tmp/
Connect to the remote server.
ssh -i <SSH_KEY> <SSH_USER>@<SERVER_HOST>
Create a directory for Composer packages and copy the zip into it.
sudo mkdir -p /opt/packagessudo cp /tmp/ceretax-extension-1.0.0.zip /opt/packages/
Navigate to Magento root and tell Composer where to find the package.
cd <MAGENTO_ROOT>sudo composer config repositories.ceretax artifact /opt/packages
If you get this error: The file "./composer.json" is not writable.
Fix: Use sudo instead of sudo -u <WEB_USER> for Composer config and require commands.
Install the CereTax module via Composer.
sudo composer require ceretax/module-tax-connector:1.0.0
Composer runs as root, so fix ownership back to the web server user.
sudo chown -R <WEB_USER>:<WEB_USER> vendor/ composer.json composer.locksudo chown -R <WEB_USER>:<WEB_USER> vendor/ceretax/sudo chmod -R 755 vendor/ceretax/
Register the module with Magento.
sudo -u <WEB_USER> php bin/magento module:enable Ceretax_TaxConnector
Create CereTax database tables and columns.
sudo -u <WEB_USER> php bin/magento setup:upgrade
setup:upgrade may regenerate files owned by root. Fix permissions before compiling.
sudo chown -R <WEB_USER>:<WEB_USER> vendor/ceretax/sudo chmod -R 755 vendor/ceretax/
If you get this error: Warning: file_get_contents(...vendor/ceretax/...): Permission denied
Fix: Run the ownership fix commands above, then retry di:compile.
Compile dependency injection.
sudo -u <WEB_USER> php bin/magento setup:di:compile
Deploy static content (CSS, JS, templates).
sudo -u <WEB_USER> php bin/magento setup:static-content:deploy -f
Flush all caches.
sudo -u <WEB_USER> php bin/magento cache:flush
Check the module is enabled.
sudo -u <WEB_USER> php bin/magento module:status | grep Ceretax
Check Composer sees the package.
sudo -u <WEB_USER> composer show ceretax/module-tax-connector
Use this when Magento is running on the same machine where you have terminal access. No SSH or SCP needed.
Create a directory and copy the zip file into it.
sudo mkdir -p /opt/packagessudo cp <LOCAL_ZIP_PATH> /opt/packages/
Note: The zip can be anywhere on the machine. Just copy it into /opt/packages/ (or any directory you choose).
Navigate to Magento root, register the artifact repo, and install.
cd <MAGENTO_ROOT>sudo composer config repositories.ceretax artifact /opt/packagessudo composer require ceretax/module-tax-connector:1.0.0
Restore correct ownership after Composer installs as root.
sudo chown -R <WEB_USER>:<WEB_USER> vendor/ composer.json composer.locksudo chown -R <WEB_USER>:<WEB_USER> vendor/ceretax/sudo chmod -R 755 vendor/ceretax/
Enable the module.
sudo -u <WEB_USER> php bin/magento module:enable Ceretax_TaxConnector
Run database migrations.
sudo -u <WEB_USER> php bin/magento setup:upgrade
Fix permissions (in case setup:upgrade created root-owned files).
sudo chown -R <WEB_USER>:<WEB_USER> vendor/ceretax/sudo chmod -R 755 vendor/ceretax/
Compile dependency injection.
sudo -u <WEB_USER> php bin/magento setup:di:compile
Deploy static content.
sudo -u <WEB_USER> php bin/magento setup:static-content:deploy -f
Flush all caches.
sudo -u <WEB_USER> php bin/magento cache:flush
Check the module is enabled.
sudo -u <WEB_USER> php bin/magento module:status | grep Ceretax
Check Composer sees the package.
sudo -u <WEB_USER> composer show ceretax/module-tax-connector
Note: Keep the zip file in /opt/packages/. Composer needs it there whenever you run composer install or composer update (e.g. after adding other packages).
Note: If you get permission errors at any point during di:compile or setup:upgrade, always run the ownership fix first:
sudo chown -R <WEB_USER>:<WEB_USER> vendor/ceretax/sudo chmod -R 755 vendor/ceretax/