1
votes

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.

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?

1
It's impossible to say without knowing how you've setup your Magento system, and how you've setup your Wordpress system. If memory serves, Fishpig pulls blog content into Magento, meaning your actual wordpress install could be anywhere. - Alan Storm
Hi @AlanStorm I install Magento and Wordpress using the normal procedure but I install on Magento an extension to integrate Wordpress into Magento and it's working fine. The Magento shop is in the root of the server and the wordpress instance is inside of a folder called "wordpress" - Victor NWD

1 Answers

0
votes

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