Berikut solusi atau cara mengatasi tidak bisa install dan upgrade Mageplaza Module Core Magento dengan keterangan seebagai berikut:
Problem 1
- magento/magento-composer-installer 0.1.12 requires composer-plugin-api ^1.0 -> found composer-plugin-api[2.0.0] but it does not match the constraint.
- magento/product-community-edition 2.2.0 requires magento/magento-composer-installer >=0.1.11 -> satisfiable by magento/magento-composer-installer[0.1.12].
- magento/product-community-edition is locked to version 2.2.0 and an update of this package was not requested.
You are using Composer 2, which some of your plugins seem to be incompatible with. Make sure you update your plugins or report a plugin-issue to ask them to support Composer 2.
Ini bisa untuk VPS maupun shared hosting yang ada akses SSH, misalnya hosting shared versi composer 2.x kita bisa custom sesuai kebutuhan Magento, misalnya composer v.1.
Khusus VPS
Jika magento di VPS caranya sangat mudah, cukup upgrade ke versi composer 1.x dengan perintah berikut
composer self-update --1
Kelak jika ingin kembali ke composer 2.x gunakan perintah ini
composer self-update --2
Khusus shared hosting dengan akses SSH
Download versi Composer di: https://getcomposer.org/download/ di daftar bagian bawah ada banyak versi, silahkan pilih yang cocok. Disini saya contohkan versi 1.0 karena kebetulan Magentonya hanya mau pada Composer versi tersebut.
1. Masuk dimana direktori Magento terinstall, misal: /home/mage/public_html
cd /home/mage/public_html
2. Rename file composer.lock
mv composer.lock composer.lock.ori
3. Download Composer:
wget https://getcomposer.org/download/1.0.3/composer.phar
4. CHMOD 755
chmod 755 composer.phar
5. Rename, agar mudah diingat saat eksekusi perintah
mv composer.phar composer
6. Uji coba upgrade Mageplaza Module Core
php -d memory_limit=-1 ./composer update mageplaza/module-core
Catatan:
memory_limit=-1
untuk antisipasi agar tidak error Fatal error: Allowed memory size
Selesai, semoga bermanfaat.