Web Analytics

Fill the form & Get Installation Support

Add cms page via install script in magento 2

Today we are going to share that how to add CMS page via install script in CMS page admin area.

This is our module : Magemonkeys_Cmspagescript

So we need to create InstallData.php file in setup folder

Here is code

Now all we have to do is to run below commands:

php bin/magento setup:upgrade
php bin/magento cache:clean

That’s it. Hope that helps!

Fill the below form if you have any Magento programming need.

    Recent Articles

    Author Info

    Author Image

    Magento 2 Developer

    Hire P. Garchar

    Get a Free Quote

      /* second popup */

      Connect With Us