Devhub is the project name for developer.wordpress.org, which is currently under development. A full project specification is available on the Make/Meta blog.

Devhub is a new home for developer documentation on WordPress.org. It comprises:

  • an auto-generated code reference
  • targeted handbooks for developers

The project requires the following types of contributors:

  • PHP developers
  • front-end developers
  • designers and UXers
  • anyone who wishes to provide feedback

What needs to be worked on What needs to be worked on

  • improvements to WP-Parser
  • enhancements to the site, including upvoting and commenting
  • improvements to the theme, including the code reference and handbooks
  • testing and feedback

Top ↑

To get involved To get involved

You can get involved in the following ways:

Top ↑

Setting up your development environment Setting up your development environment

To develop on developer.wordpress.org you will need to set up your local development environment. Before you do, be sure you’ve setup your environment to read .htaccess files properly. If you end up with 404 errors where content should be, your .htaccess file is not being read.

On a local WordPress install, do the following:

1. Install the theme 1. Install the theme

Checkout the developer.wordpress.org theme from the meta svn repository.

svn checkout https://meta.svn.wordpress.org/sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/ wp-content/themes/wporg-developer

Top ↑

Download the following HTML files:

Place these in wp-content/themes/.

Open wp-config.php and just before /* That's all, stop editing! Happy blogging. */ add:

define( 'WPORGPATH', __DIR__ . '/wp-content/themes/' );

Open up the wordpress.org header.php file and add the following to the bottom of the file:

<?php wp_head(); ?>

Then change the opening body tag to this:

<body id="wordpress-org" <?php body_class(); ?>>

Open up the wordpress.org footer.php and add the following directly before the </body>tag:

<?php wp_footer(); ?>

Top ↑

3. Install Composer 3. Install Composer

Install composer in the working directory following the Composer installation instructions.

Top ↑

4. Install WP-Parser 4. Install WP-Parser

Install WP-Parser into wp-content/plugins/ using Composer:

composer create-project wordpress/phpdoc-parser:dev-master --no-dev

If you had updated WP–Parser via pulling latest code via Git and getting errors about missing classes — you need to rebuild autoload by following command in its directory:

composer dump-autoload

If you want to develop WP-Parser (Welcome to the dark art of parsing) you shouldn’t use “composer create-project” but instead clone the WP-Parser repository

Top ↑

5. Install wp-cli 5. Install wp-cli

Install wp-cli.

If you are using MAMP you may get a MySQL error. You can try this solution or an alternative install method.

Top ↑

6. Run WP-Parser 6. Run WP-Parser

Enable WP-Parser via your admin or by using the command

wp plugin activate wp-parser

(the directory name is case sensitive)

Run the indexing command:

wp parser create . --user=1

Notes:

  • .stands for the current directory
  • --user=1 is needed to attribute posts, 1 is typical for initial admin account, adjust to user ID or login if needed

Top ↑

7. Compiling SCSS to CSS 7. Compiling SCSS to CSS

To compile the SCSS to CSS the following command can be used when in the theme folder:

scss --no-cache --update --style=expanded scss:stylesheets

To watch the SCSS you can use:

scss --no-cache --watch --style=expanded scss:stylesheets