Adding a JSON plugin in a Magento-WordPress integration

I’m integrating WordPress and Magento using the Magento WordPress Integration module and it’s working fine.

But I need to get data from the blog using an external API. I installed JSON API plugin but it didn’t work properly with the latest version of WordPress.

Read More

After that I installed another JSON plugin called Termal API, I cannot get it to work either because when I try to access the API url:

http://www.example.com/blog/wp_api/v1/posts

Magento redirects to 404 not found page.

What can I do to access to the API url? Do you know of any other plugins which provide a RESTFUL API?

Related posts

Leave a Reply

1 comment

  1. I’ve solved the issue by myself. I going to explain what I did if someone else have the same problem I had.

    You need to create or edit the htaccess file inside of your worpdress folder and put the next content inside of it

    # BEGIN WordPress
    
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . index.php [L]
    </IfModule>
    

    After that the JSON plugin should work properly.

    Thank you guys