{"id":21390072,"url":"https://github.com/arroyolabs/erdiko-wordpress","last_synced_at":"2025-07-13T16:31:59.281Z","repository":{"id":20408277,"uuid":"23684462","full_name":"ArroyoLabs/erdiko-wordpress","owner":"ArroyoLabs","description":"Headless WordPress","archived":false,"fork":false,"pushed_at":"2018-07-02T21:29:45.000Z","size":1342,"stargazers_count":7,"open_issues_count":2,"forks_count":7,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-09-18T08:32:29.102Z","etag":null,"topics":["erdiko-wordpress","headless","php","wordpress"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ArroyoLabs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-09-05T00:36:27.000Z","updated_at":"2023-08-27T19:04:42.000Z","dependencies_parsed_at":"2022-07-31T18:48:14.316Z","dependency_job_id":null,"html_url":"https://github.com/ArroyoLabs/erdiko-wordpress","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArroyoLabs%2Ferdiko-wordpress","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArroyoLabs%2Ferdiko-wordpress/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArroyoLabs%2Ferdiko-wordpress/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArroyoLabs%2Ferdiko-wordpress/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ArroyoLabs","download_url":"https://codeload.github.com/ArroyoLabs/erdiko-wordpress/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225901192,"owners_count":17542183,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["erdiko-wordpress","headless","php","wordpress"],"created_at":"2024-11-22T13:15:45.438Z","updated_at":"2024-11-22T13:15:46.265Z","avatar_url":"https://github.com/ArroyoLabs.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"erdiko-wordpress\n================\n\n* Run your WordPress site headless\n\n* Pull content from your wordpress CMS\n\nYou can use this module with any composer based php framework by simply running, composer require erdiko/wordpress.\n\n\nInstallation\n------------\n\n**1. Install WordPress**\n\nWe recommend installing WordPress in /lib/wordpress or its own folder at the same level as your main site. For instance /wordpress and /[my-website].  However it can be anywhere as long is the codebase is accessible. Follow the WordPress docs on how to install WordPress.\n\n***Important*** If your WordPress codebase is in /lib/wordpress and /lib is at the same level as your vendor folder then you can skip the rest of step #1.\n\nAdd this to your codebase.\n```\n    define('WORDPRESS_ROOT', '/this/is/the/wordpress/path');\n```\n\nThis could be added in a constants file, bootstrap file or index.php. Follow the conventions of your framework. If you are using Erdiko it should go in the /[my-website]/app/appstrap.php file.\n\n\n**2. Add the erdiko/wordpress package using composer**\n\n```\n    composer require erdiko/wordpress\n```\n\nUsage\n-----\n\nHere are some examples of how to use this package. See the source code for the full API.\n\nTo pull content from WordPress\n\n\t$model = new \\erdiko\\wordpress\\Model;\n\t$post = $model-\u003egetPost(1);\n\nTo get an Author\n\n\t$author = new \\erdiko\\wordpress\\models\\Author;\n\t$author-\u003egetAuthor('name');\n\nGet all posts\n\n\t$content = new \\erdiko\\wordpress\\models\\Content;\n\t$content-\u003egetAllPosts();\n\n\nCreate a full headless site with Erdiko\n---------------------------------------\n\nThese additional instructions are for creating a complete headless blog using Erdiko. All CMS data is coming from WordPress and is rendered in a clean bootstrap based theme. We have included controllers, models, views and a full theme.\n\n**1. Install Erdiko**\nUsing composer, it is a very simple to create an erdiko project.\n\n\tcomposer create erdiko/erdiko [my-project-name]\n\nMore information available at [http://erdiko.org](http://erdiko.org/)\n\n**2. Add your routes**\n\nAdd the following lines to your routes.json file to enable the wordpress example and content controllers. It give you a FULL headless wordpress site. Use this as an example, extend the classes in your app or roll your own headless solution. Keep in mind, all that is really needed to pull WordPress data is to create a model that extends erdiko\\wordpress\\Model.\n\nUpdate your /app/config/default/routes.json with:\n\n```\n\"/\": \"\\erdiko\\wordpress\\controllers\\Posts\",\n\"author/:alpha\": \"\\erdiko\\wordpress\\controllers\\Author\",\n\"category/:alpha\": \"\\erdiko\\wordpress\\controllers\\Category\",\n\"tag/:alpha\": \"\\erdiko\\wordpress\\controllers\\Tag\",\n\"/:action\": \"\\erdiko\\wordpress\\controllers\\Content\"\n```\n\nFeel free to adjust accordingly.\n\n**3. Copy the default theme**\n\nWe even included a sample theme that is bootstrap based. Copy the files from your vendor folder vendor/erdiko/wordpress/app/themes/ and vendor/erdiko/wordpress/public/default/themes/ into your app/themes/ and public/default/themes folder respectively.\n\nTheme is based on css from the [Start Bootstrap](https://startbootstrap.com/template-overviews/clean-blog/) theme.\n\n**4. Add a symlink for the uploaded files (optional)**\n\n```\n\tmkdir -p public/wp-content\n\tcd public/wp-content\n\tln -s ../../../lib/wordpress/wp-content/uploads uploads\n```\n\nNotes\n-----\n\nWe welcome your feedback. Let us know how we can improve this package.\n\nIf anyone is interested in helping us port this to Laravel or Symfony please send us a message. We would love to support more frameworks!\n\nSponsored by [Arroyo Labs](http://arroyolabs.com/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farroyolabs%2Ferdiko-wordpress","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farroyolabs%2Ferdiko-wordpress","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farroyolabs%2Ferdiko-wordpress/lists"}