Magento 2 WordPress Root DocumentationRoot

« Back to Magento 2 WordPress - Root

  • Installation

    You can install the module for Magento 2 using Composer or you can manually install it using FTP.

    • Run the following commands in your Magento 2 root directory to install the module using Composer.

      # Add the FishPig Composer repo
      composer config repositories.fishpig composer
      # Install the module using Composer
      composer require fishpig/magento2-wordpress-integration-root:^3.0
      # Enable the module in Magento 2
      php bin/magento module:enable FishPig_WordPress_Root
      # Run the Magento upgrade system
      php bin/magento setup:upgrade
    • You can download the latest version of the module from the Downloads page.

      Extract the ZIP file and upload the files to your Magento site at the directory below:


      When creating the folders, ensure you use the correct capitalisation.

      To complete the installation, run the following commands in a terminal.

      # Enable the module in Magento 2
      php bin/magento module:enable FishPig_WordPress_Root
      # Run the Magento upgrade system
      php bin/magento setup:upgrade

    ↑ Back to Top

  • Configuration

    Once the module is installed, you need to make some small WordPress configuration changes.

    WordPress URLs

    Next you need to change the WordPress home URL to be the base URL of your Magento store. To do this, login to the WordPress Admin and select Settings > General. You should see 2 URL fields. Change the second field to your Magento store's base URL.

    Settings WordPress URLs for use with Root

    To finish the configuration, open your wp-config.php file and find the WP_DEBUG line and add the following below it:

    define('COOKIEPATH', '/'); // Add this below the WP_DEBUG line

    While it's useful to remove /blog/ (or whatever your blog URL is) from some URLs, it's useful to keep it for your default posts. To do this, select Settings', 'Permalinks in the WordPress Admin and add /blog/ to the permalink structure (eg. /blog/%postname%/).

    Adding /blog/ back into permalinks

    Create a Default Post List Page (blog/)

    If you add /blog/ back in to your default blog posts, you will want to create a /blog/ page to list all of your blog posts. This is the page that is the standard WordPress homepage and probably was your blog homepage before installing Root. To do this, first create a WordPress page and then select this page from the drop down at Settings > Reading > Your homepage displays > A static page > Posts Page.

    Replace the Magento Homepage

    To replace the Magento homepage with a page created in WordPress, create a new page in WordPress, publish it and then select it from the dropdown at Settings > Reading > Your homepage displays > A Static page > Homepage.

    ↑ Back to Top

Want to Make Magento 2 Faster?

Make Magento 2 instantly faster by installing our industry recognised optimisation modules.

  • Full Page Cache

    Magento 2 Full Page Cache

    The fastest full page cache extension available for Magento 1 and Magento 2. It's even faster than the default Magento 2 FPC.

  • Page Speed

    Magento 2 Page Speed

    Automatically increase your page speed by optimising your content and assets.

  • Security Suite

    Magento 2 Security Suite

    Protect your site from spam, bots and hackers using this automated rule based security system.

  • Cache Warmer

    Magento 2 Cache Warmer

    Automatically request all URLs in your XML sitemap to pre warm your full page cache.