PHPackages                             dtbaker/envato-wp-theme-setup-wizard - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. dtbaker/envato-wp-theme-setup-wizard

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

dtbaker/envato-wp-theme-setup-wizard
====================================

A WordPress installation wizard for ThemeForest items that runs after theme activation.

201768[6 issues](https://github.com/dtbaker/envato-wp-theme-setup-wizard/issues)PHP

Since Apr 17Pushed 6y ago20 watchersCompare

[ Source](https://github.com/dtbaker/envato-wp-theme-setup-wizard)[ Packagist](https://packagist.org/packages/dtbaker/envato-wp-theme-setup-wizard)[ RSS](/packages/dtbaker-envato-wp-theme-setup-wizard/feed)WikiDiscussions master Synced 4w ago

READMEChangelogDependenciesVersions (1)Used By (0)

Envato WordPress Theme Setup Wizard
===================================

[](#envato-wordpress-theme-setup-wizard)

A step by step setup wizard that runs after a ThemeForest theme has been activated.

Video Demo:
-----------

[](#video-demo)

Best to watch this video demo to see exactly what this plugin does: [![ScreenShot](https://camo.githubusercontent.com/1718be704f732aea2e95cc865972010eb5771274fbaa16c13f86f10ed33c6f5e/68747470733a2f2f696d672e796f75747562652e636f6d2f76692f764d65793142724b505f412f302e6a7067)](https://www.youtube.com/watch?v=vMey1BrKP_A)

Setup Instructions
------------------

[](#setup-instructions)

- Copy the `api` folder onto your web server ( e.g. yoursite.com/envato/api/ ) - it's best if this is hosted on SSL
- This API folder will handle oAuth login for automatic theme updates in the (new) Envato Market plugin.
- Register a new App at  ( tick the "Download the users purchased items", and "View the users purchases of the app creators items" permissions). Put in the full URL to `server-script.php` as the confirmation URL.
- At the top of `api/server-script.php` fill in the values from your Envato app and the full URL to `server-script.php` :

```
define('_ENVATO_APP_ID','put-your-envato-app-id-here');
define('_ENVATO_APP_SECRET','put-your-envato-app-secret-here');
define('_ENVATO_APP_URL','http://yoursite.com/envato/api/server-script.php');
```

- Copy the `envato_setup` folder into your private $envato\_usernameheme folder.
- In your theme's `functions.php` set your Envato username and the full url to your `server-script.php` file via filters:,

```
// Please don't forgot to change filters tag.
// It must start from your theme's name.
add_filter('twentyfifteen_theme_setup_wizard_username', 'twentyfifteen_set_theme_setup_wizard_username', 10);
if( ! function_exists('twentyfifteen_set_theme_setup_wizard_username') ){
    function twentyfifteen_set_theme_setup_wizard_username($username){
        return 'dtbaker';
    }
}

add_filter('twentyfifteen_theme_setup_wizard_oauth_script', 'twentyfifteen_set_theme_setup_wizard_oauth_script', 10);
if( ! function_exists('twentyfifteen_set_theme_setup_wizard_oauth_script') ){
    function twentyfifteen_set_theme_setup_wizard_oauth_script($oauth_url){
        return 'http://yoursite.com/envato/api/server-script.php';
    }
}
```

- Make sure TGMPA is enabled, configured and working correctly in your theme ( see  ). This wizard integrates with the latest version of TGM to find which plugins needs to be installed.
- Make sure the `Envato Market` plugin is added to the required plugin list in TGM, it can be added like this:

```
        array(
            'name' => 'Envato Market',
            'slug' => 'envato-market',
            'source' => 'https://envato.github.io/wp-envato-market/dist/envato-market.zip',
            'required' => true,
            'recommended' => true,
            'force_activation' => true,
        ),
```

- `envato_setup/js/envato-setup.js` is the script which handles the "Loading Button" animation (pretty simple and cool hey?) along with processing the ajax requests for each default installation action.
- The ajax requests happen in two queries. The first ajax query from javascript will get the "Loading" text to display (e.g. "Installing Pages") along with the URL and data to perform the actual ajax task. Javascript then executes the second ajax task to actually perform the action. And then a third ajax request to confirm it worked.
- `envato_setup/content/` contains the default content that will be loaded during the wizard. e.g. `envato_setup/content/default.json` contains all posts and custom post types.
- If you add `&export=true` to the URL of the first page setup wizard it will output the required json data into the `envato_setup/content/` folder, it will also put media files into a local `images/stock/` folder.
- If you're looking to change what meta fields get exported have a look here: [https://github.com/dtbaker/envato-wp-theme-setup-wizard/blob/master/envato\_setup/envato-setup-export.php#L54](https://github.com/dtbaker/envato-wp-theme-setup-wizard/blob/master/envato_setup/envato-setup-export.php#L54)
- If you need to replace post ids, urls or shortcode content that is stored in a post meta field, look at the \_elementor\_id\_import function here: [https://github.com/dtbaker/envato-wp-theme-setup-wizard/blob/master/envato\_setup/envato\_setup.php#L1890](https://github.com/dtbaker/envato-wp-theme-setup-wizard/blob/master/envato_setup/envato_setup.php#L1890)
- The `_parse_gallery_shortcode_content` function is what replaces URL's, gallery shortcode id's and contact-form-7 id's. This function is run on some meta fields as well (e.g. Elementor can store shortcodes and section content in meta fields, need to replace content in here)

Site Styles
-----------

[](#site-styles)

[![ScreenShot](https://camo.githubusercontent.com/63c8089283f96d0ea67a6b2d40d6f0b6394d5191c735cf1f1cdcc88c41b0995b/68747470733a2f2f692e696d6775722e636f6d2f477464504b72572e706e67)](https://i.imgur.com/GtdPKrW.png)

You can setup multiple styles for your site. This lets you export different content/images/options/posts/etc.. and the user can pick which one they want during the setup wizard.

The installer reads the `dtbwp_site_style` theme mod value like this:

```
get_theme_mod( 'dtbwp_site_style', $this->get_default_theme_style() );

```

Change the available styles in envato\_setup.php here:

```
$this->site_styles = array(
    'style1' => 'Style 1',
    'style2' => 'Style 2',
);

```

If you only have 1 style you can set this to an empty array.

Place the logo/thumbnail for each style into the `envato_setup/images/styleX/` folders.

Envato Market Plugin
--------------------

[](#envato-market-plugin)

The Envato Market plugin is very new. Details here: By default the Envato Market plugin requires users generate a personal token for the API. This can be time consuming and confusing for first time buyers. This `envato-setup.php` script combined with the code in `/api/` adds a few hooks to the Envato Market plugin to enable single click oAuth login for updates. It's by far from perfect but the only way to get oAuth login working with updates.

Feel free to pull my oAuth code apart. You'll see this is a method of getting a purchase code back into the WordPress theme. So if you just need a purchase code for some other purpose then you can use this oAuth bounce to get one easily.

Warning
-------

[](#warning)

This script integrates heavily into my current theme (beautiful watercolor) by pulling in configuration variables and running some other hooks/functions that are defined in my theme. This wizard will not work completely straight out of the box. But hopefully it gives you some ideas :)

More Details.
-------------

[](#more-details)

Feel free to do a pull request with improvements.

Feel free to ask questions on the forum (  ) or create issues here on github.

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance19

Infrequent updates — may be unmaintained

Popularity25

Limited adoption so far

Community21

Small or concentrated contributor base

Maturity34

Early-stage or recently created project

 Bus Factor1

Top contributor holds 66% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/543073?v=4)[dtbaker](/maintainers/dtbaker)[@dtbaker](https://github.com/dtbaker)

---

Top Contributors

[![dtbaker](https://avatars.githubusercontent.com/u/543073?v=4)](https://github.com/dtbaker "dtbaker (31 commits)")[![vburlak](https://avatars.githubusercontent.com/u/1781636?v=4)](https://github.com/vburlak "vburlak (11 commits)")[![cyberwani](https://avatars.githubusercontent.com/u/1647283?v=4)](https://github.com/cyberwani "cyberwani (5 commits)")

### Embed Badge

![Health badge](/badges/dtbaker-envato-wp-theme-setup-wizard/health.svg)

```
[![Health](https://phpackages.com/badges/dtbaker-envato-wp-theme-setup-wizard/health.svg)](https://phpackages.com/packages/dtbaker-envato-wp-theme-setup-wizard)
```

###  Alternatives

[bitwasp/bitcoin

PHP Bitcoin library with functions for transactions, signatures, serialization, Random/Deterministic ECDSA keys, blocks, RPC bindings

1.1k537.0k43](/packages/bitwasp-bitcoin)[fadion/fixerio

Wrapper for Fixer.io

49340.4k](/packages/fadion-fixerio)[humanmade/clean-html

Safe HTML for WordPress. Adds esc\_\*()-like function to allow some HTML.

46202.9k10](/packages/humanmade-clean-html)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
