-
Notifications
You must be signed in to change notification settings - Fork 0
Wordpress Projects
Brendan Sheehan edited this page May 9, 2019
·
2 revisions
Wordpress
cd wp-content/themes/manufactur-theme # Enter project directory
npm install # Install dependencies
gulp # run gulp default taskYour local environment settings will go here
If you are pulling database from a remote server, you may need to update the site URL
define( 'WP_HOME', 'http://YOUR_LOCAL_ENVIRONMENT_URL' );
define( 'WP_SITEURL', 'http://YOUR_LOCAL_ENVIRONMENT_URL' );Include the following to enable livereload
wp_register_script('livereload', 'http://localhost:35729/livereload.js?snipver=1');
wp_enqueue_script('livereload');"Synch" uploads from a remote environment by configuring the following. This actually uses the assets from the remote server so we don't have to synch. This is not needed if we are using static file storage such as S3.
add_filter('pre_option_upload_url_path', function ($upload_url_path) {
return 'http://REMOTE_ENVIRONMENT_URL/wp-content/uploads';
});Its good practice to enable WP_DEBUG. This will print out PHP errors or warnings.
define( 'WP_DEBUG', true );