{"id":14987466,"url":"https://github.com/tattersoftware/codeigniter4-wordpress","last_synced_at":"2025-04-12T00:15:11.982Z","repository":{"id":39873995,"uuid":"298874627","full_name":"tattersoftware/codeigniter4-wordpress","owner":"tattersoftware","description":"WordPress content management for CodeIgniter 4","archived":false,"fork":false,"pushed_at":"2023-02-22T01:41:24.000Z","size":112,"stargazers_count":7,"open_issues_count":5,"forks_count":3,"subscribers_count":2,"default_branch":"develop","last_synced_at":"2025-03-25T19:53:39.900Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/tattersoftware.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-09-26T18:22:29.000Z","updated_at":"2025-02-05T05:56:56.000Z","dependencies_parsed_at":"2024-09-25T00:32:18.039Z","dependency_job_id":null,"html_url":"https://github.com/tattersoftware/codeigniter4-wordpress","commit_stats":{"total_commits":45,"total_committers":1,"mean_commits":45.0,"dds":0.0,"last_synced_commit":"2ea824b91206650b58c507d461b743888100439e"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tattersoftware%2Fcodeigniter4-wordpress","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tattersoftware%2Fcodeigniter4-wordpress/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tattersoftware%2Fcodeigniter4-wordpress/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tattersoftware%2Fcodeigniter4-wordpress/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tattersoftware","download_url":"https://codeload.github.com/tattersoftware/codeigniter4-wordpress/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248091153,"owners_count":21046216,"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":[],"created_at":"2024-09-24T14:14:39.483Z","updated_at":"2025-04-12T00:15:11.940Z","avatar_url":"https://github.com/tattersoftware.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Tatter\\WordPress\nWordPress content management for CodeIgniter 4\n\n[![](https://github.com/tattersoftware/codeigniter4-wordpress/workflows/PHPUnit/badge.svg)](https://github.com/tattersoftware/codeigniter4-wordpress/actions?query=workflow%3A%22PHPUnit)\n[![](https://github.com/tattersoftware/codeigniter4-wordpress/workflows/PHPStan/badge.svg)](https://github.com/tattersoftware/codeigniter4-wordpress/actions?query=workflow%3A%22PHPStan)\n\n## Quick Start\n\n1. Install with Composer: `\u003e composer require tatter/wordpress`\n2. Add a new database connection:\n```\n\tpublic $wordpress = [\n\t\t'DBDriver' =\u003e 'Tatter\\WordPress\\Database',\n\t\t'WPConfig' =\u003e '/path/to/wp-config.php',\n\t];\n```\n\n## Description\n\n**Tatter\\WordPress** provides a way for you to connect your CodeIgniter 4 instance to an\nexisting WordPress installation.\n\n## Usage\n\nThis library comes with the `Reader` class, a parser designed to read configuration values\nfrom WordPress' **wp-config.php** file. By extracting database information and installation\npath, `Tatter\\WordPress` can connect to the same database and modify information using the\nsupplied models.\n\n## Database\n\nIn order to use the database you need to define a new database group that uses the\nconnection details provided by `Reader`. Add a property to **app/Config/Database.php**\nwith the driver and the path to your **wp-config.php** file, like this:\n\n```\nclass Database extends BaseConfig\n{\n\tpublic $wordpress = [\n\t\t'DBDriver' =\u003e 'Tatter\\WordPress\\Database',\n\t\t'WPConfig' =\u003e '/path/to/wp-config.php',\n\t];\n```\n\n## Models and Entities\n\nThis library defines Models and Entities that correspond to WordPress's database tables.\nYou may use them like ordinary CodeIgniter 4 Models, but pay attention to WordPress's\n[particular database structure](https://codex.wordpress.org/Database_Description). \"Meta\"\ntables are handled via a special Entity extension `MetaHandler`, which allows read/write\naccess to individual meta rows as class properties:\n```\n// Get a particular Post\n$post = model('Tatter\\WordPress\\Models\\PostModel')-\u003efind($postId);\n\n// Access post metadata\necho $post-\u003emeta-\u003e_wp_page_template; // 'default'\n\n// Update post metadata\n$post-\u003emeta-\u003e_wp_page_template = 'mobile';\n```\n\n## Commands\n\nThere are a few commands to make it easier to interact with your configuration - these are\nalso a great way to make sure your WordPress database is set up correctly.\n\n* `posts:list` - Lists all Posts in a table format\n* `posts:show [postId]` - Displays details for a single Post\n* `posts:delete [postId]...` - Deletes one or more Posts by their ID\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftattersoftware%2Fcodeigniter4-wordpress","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftattersoftware%2Fcodeigniter4-wordpress","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftattersoftware%2Fcodeigniter4-wordpress/lists"}