Welcome Guest, Not a member yet? Register   Sign In
WordPress Connector

Hi all- I have a pretty interesting but niche module to share with you, compliments of an employer who likes to support open-source software.
If you're like me you would love to spend all our time in CodeIgniter, but those constant requests for "help with my website" keep landing you back in WordPress (bless its little heart).
Well what if I told you that you could work on a WordPress site in CodeIgniter? Look no further!

WordPress content management for CodeIgniter 4

Tatter\WordPress is a module you may add to any CodeIgniter 4 app to allow it to connect to and work with an existing WordPress installation. The library comes with the Reader class, a parser designed to read configuration values from WordPress' wp-config.php file. By extracting database information and installation path, Tatter\WordPress can connect to the same database and work with its content. An example addition to your Database config:
PHP Code:
class Database extends BaseConfig
$wordpress = [
'DBDriver' => 'Tatter\WordPress\Database',
'WPConfig' => '/path/to/wp-config.php',

Once you have a successful connection, you may use the modules's Models and Entities corresponding to WordPress's database tables to make changes. This initial release includes full support for "wp_posts" (that was the scope needed for my current project) but support for more tables will be added over time and on request.

View and install the package from Packagist or provide feedback, bug reports, and requests at GitHub.

Wow. The stuff that you put together never ceases to amaze me. Thanks for sharing this!

(This post was last modified: 10-31-2020, 06:32 AM by MGatner.)

<3 thanks friend. I’m always pleased when something I’m working on can be shared with the larger community

Theme © iAndrew 2016 - Forum software by © MyBB