Is there a way of downloading only the Rest API
part of WordPress and not all the old PHP files?
-
1question as is do not make much sense. API is just a definition of what functions names to use and what parameters they can recieve. You can not "download" an API, a best you can download a documentation of it.– Mark KaplunAug 26, 2021 at 7:47
-
WordPress’s Rest API is hosted in your website and not on Wordpress.org or Wordpress.com so you need to download it. Right? Am I wrong?– Ayo ReisAug 26, 2021 at 9:34
-
1You can't host an API, you can host the code that implements it. The code that implements the wordpress rest API is part of wordpress– Mark KaplunAug 26, 2021 at 10:06
-
Hadn't thought about it that way!– Ayo ReisAug 26, 2021 at 14:00
1 Answer
WP REST API depends on WordPress, as it is just another interface for interacting with its other APIs. If BackPress (https://backpress.org/) was still in development, you could have had some chance with it, but it seems the project is abandoned.
The plugin that was merged with WordPress Core is available here: https://github.com/WP-API/WP-API but is also abandoned, so you will not get the latest stuff that's in 5.8. I don't know whether this would be of help to you, as I don't know your main goal, but I would rather try to extract whatever I need from nowadays' Core, than messing with the old plugin.
-
I though that Rest API used only JS and I did not need any of the PHP files. So I just din't want to have toooons of unused files. But since the "unused" files are actualy used I will hust continue with the normal WordPress– Ayo ReisAug 25, 2021 at 17:30
-
-
2No, it won’t. The REST API is powered entirely by PHP anyway. It just means that you can write a JS application that uses WordPress data. WordPress itself is not going to be JS. Aug 25, 2021 at 23:42
-