Gulp installation with wordpress and xampp
- Clone the repo
- Run
npm install
in cli
The gulpfile is pretty straight forward. So far, what I change is the url for static and dev servers.
This task will serve a static server in your browser with browser-sync. This has nothing to do with your wordpress site. You can design your site in php (or html) like you would normally (by linking styles and javascript etc in your html/php files).
However, you would need to change a thing or two (depending on your work) in the gulp.task('serverstatic')
.
- Change the url to your site
server: './'
- Note: I added
./
because this is what keeps the server static.
- Change folder hierarchy how it suites you
- do necessary changes in gulpfile.js according to that
- In your browser, append /staic/index.html after you localhost. Otherwise you will get cannot /GET error.
This task will be the one which connects your with xampp server. To customize according to your needs, follow the following instructions:
- Change the url to your site
proxy: "localhost/link-to-your/sitefolder/",
- Change the port (default is 80)
port: 80
- Change the folder hierarchy
Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
Source: ISC