-
Notifications
You must be signed in to change notification settings - Fork 1
Local Development
Kevin Hoffman edited this page Jul 6, 2018
·
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.
This site represents the end user who has downloaded the WP Business Reviews plugin.
- Create a new local WordPress site at
wpbusinessreviewsclient.test
. This domain must be used in order for the local dev flags to work correctly. - Install and activate the WP Business Reviews client plugin.
- Define the following constants in
wp-config.php
:
define( 'WPBR_ENV', 'development' );
define( 'WPBR_SERVER_URL', 'wpbusinessreviews.test' );
Setting these constants links the Connect to Facebook
button to wpbusinessreviews.test
for testing. If this constant is not set to development
, then the plugin will attempt to authenticate through wpbusinessreviews.com
.
- Create a new local WordPress site at
wpbusinessreviews.test
. This domain must be used in order for the local dev flags to work correctly. - Install and activate the WP Business Reviews Server plugin.
- Visit https://developers.facebook.com/apps/ and select the
WP Business Reviews
app to access the app ID and app secret. - 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}' );
- Ensure that the
wpbusinessreviews.test
URL is listed among valid OAuth redirect URLs in the Facebook app settings atApp Dashboard > Facebook Login > Settings > Valid OAuth Redirect URLs
. It should already be there, but double-check to be sure.
The local environment should now be ready for development.