Skip to content
This repository was archived by the owner on Jul 15, 2025. It is now read-only.

Local Development

Kevin Hoffman edited this page Dec 13, 2017 · 8 revisions

Local development of the WP Business Reviews Server plugin requires two local WordPress sites to mimic the client-server relationship. Complete the setup steps for both websites below.

Set Up WordPress Site #1: Local Client Site

This site represents the end user who has downloaded the WP Business Reviews plugin.

  1. Create a new local WordPress site at wp-business-reviews.localhost. This domain must be used in order for the local dev flags to work correctly.
  2. Install and activate the WP Business Reviews client plugin.
  3. Add define( 'WPBR_ENV', 'development' ); to wp-config.php. Setting this constant links the Connect to Facebook button to wp-business-reviews-server.localhost for testing. If this constant is not set to development, then the plugin will attempt to authenticate through wpbusinessreviews.com.

Set Up WordPress Site #2: Local Server Site

  1. Create a new local WordPress site at wp-business-reviews-server.localhost. This domain must be used in order for the local dev flags to work correctly.
  2. Install and activate the WP Business Reviews Server plugin.
  3. Visit https://developers.facebook.com/apps/ and select the WP Business Reviews app to access the app ID and app secret.
  4. Define the following constants in wp-config.php:
define( 'WPBRS_FACEBOOK_APP_ID', '{INSERT_APP_ID_HERE}' );
define( 'WPBRS_FACEBOOK_APP_SECRET', '{INSERT_APP_SECRET_HERE}' );
  1. Ensure that the wp-business-reviews-server.localhost URL is listed among valid OAuth redirect URLs in the Facebook app settings shown below. It should already be there, but double-check to be sure.

Valid OAuth Redirect URLs

Begin Development

The local environment should now be ready for development.

Clone this wiki locally