1. Go to this page and download the library: Download zippovich2/wordpress-loader library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
zippovich2 / wordpress-loader example snippets
use WordpressWrapper\Loader\Loader;
//...
$loader = new Loader();
$loader->load();
use WordpressWrapper\Loader\Loader;
//...
$projectRoot = '/path/to/project-root/'; // this directory should containt .env files.
$public = $projectRoot . '/public'; // this directory should containt index.php file
$wpCore = '/wp'; // relevant path from $public to wordpress core directory
$loader = new Loader();
$loader->load($wpCore, $projectRoot, $public);
use WordpressWrapper\Loader\Loader;
//...
$loader = new Loader();
$loader->load();
// default path is '/var/log', relevant ro project root
// it will create directroy if not exists
$loader->debugSettings('/path/to/log/dir');
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.