WordPress + Gulp 4 + MAMP

Hi guyz, I have a problem setting up gulp 4 with mamp and WP.

I created gulpfile.js and it works fine compiling and minifying on save BUT, when i save .php file there is not changes in my html.. browsercync fire but no changes..

Any help?

This is my gulpfile.js

const gulp = require(‘gulp’);
const { src, dest, watch, series } = require(‘gulp’);
*// styles*
const scss = require(‘gulp-sass’)(require(‘sass’));
const autoprefixer = require(‘gulp-autoprefixer’);
const cssMinify = require(‘gulp-clean-css’);
const concat = require(‘gulp-concat’);
const browserSync = require(‘browser-sync’).create();
const phpConnect = require(‘gulp-connect-php’);
function styles(){
return src(\[
.pipe( scss() )
.pipe( autoprefixer(‘last 2 versions’) )
.pipe( cssMinify() )
.pipe( dest(‘./wp-content/themes/savez-tema/dist/css’))
*// scripts*
const jsMinify = require(‘gulp-terser’);
function scripts(){
return src (\[
.pipe( jsMinify() )
.pipe( dest(‘./wp-content/themes/savez-tema/dist/js’))
.pipe(browserSync.reload({stream: true}));
*// watch*
function watchTask(){
proxy: ‘http://localhost:8888/savez’,
watch(\[‘./wp-content/themes/savez-tema/\*\*/\*.php’, ‘./wp-content/themes/savez-tema/src/scss/\*\*/\*.scss’, ‘./wp-content/themes/savez-tema/src/js/\*\*/\*.js’\],
series(styles, scripts))
exports.default = series(styles, scripts, watchTask)


This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer