1

I'm looking for something like npm live-server, that refreshes my webbrowser every time I make changes to a document. Npm live-server doesn't work with PHP files.

Currently using XAMPP Apache/MySQL to run WP locally.

Any ideas?

kabooya
  • 447
  • 3
  • 14

1 Answers1

1

For the one's that are interested: here is the final solution. (Big thanks to @Kintamasis )

  1. Install Gulp / Gulp BrowserSync

  2. Create a gulpfile.js in your themes' folder.

    var gulp        = require('gulp');
    var browserSync = require('browser-sync').create();
    
    gulp.task('browser-sync', function() {
        browserSync.init({
            proxy: "YOUR PROXY HERE"
        });
    
        gulp.watch("*").on('change', browserSync.reload);
    });
  1. Run gulp browser-sync in your WP theme folder.
kabooya
  • 447
  • 3
  • 14