I have MAMP PRO 5.7 running on a MacBook Pro (8GB RAM). Websites load at sitename.local.companyname.as
on port 80 with WordPress, nginx, and MySQL. I also use VSCode with composer, Gulp, and browsersync running to do development. Browsersync is set to point to a proxy of port 8181. We're developing WordPress sites using WP Rig. We are only using http://
locally, not https://
(for now).
For a while, browsersync and all browsers were working together just fine. Going to the sites on default port 80 continues to work fine, but at some point the port 8181 access (http://sitename.local.companyname.as:8181
) just stopped working. Not only that, but it began crashing Chrome and Firefox as well as other apps (like project management software "Hive") that use http connections to send and receive data. Sometimes a few individual tabs will crash (mostly Gmail and Google Calendar tabs). And sometimes the entire browser will shut down.
I've reinstalled MAMP PRO 5.7 but the problem persists. I've looked through all the browsersync and npm stuff I can think of and nothing has been changed from when it was working to when it was not. Short of reimaging my machine and starting over from scratch, I don't know what to do. Below is the output of a typical npm run dev
command.
username@machinename devfilesroot % npm run dev
> wprig@2.0.1 dev
> gulp
[09:02:46] Requiring external module @babel/register
[09:02:47] Using gulpfile ~/local/docroot/wp-content/themes/devfilesroot/gulpfile.babel.js
[09:02:47] Starting 'default'...
[09:02:47] Starting 'cleanCSS'...
[09:02:47] Finished 'cleanCSS' after 14 ms
[09:02:47] Starting 'cleanJS'...
[09:02:47] Finished 'cleanJS' after 1.94 ms
[09:02:47] Starting 'php'...
[09:02:47] Starting 'images'...
[09:02:47] Starting 'scripts'...
[09:02:47] Starting 'scripts'...
[09:02:47] Starting 'scripts'...
[09:02:47] Starting 'scripts'...
[09:02:47] Starting 'styles'...
[09:02:47] Finished 'scripts' after 324 ms
[09:02:49] Finished 'scripts' after 2.18 s
[09:02:49] Finished 'scripts' after 2.19 s
[09:02:49] gulp-imagemin: Minified 0 images
[09:02:49] Finished 'images' after 2.37 s
[09:02:50] Finished 'scripts' after 2.85 s
[09:02:51] Finished 'styles' after 4.26 s
[09:02:51] Starting 'editorStyles'...
[09:02:52] Finished 'editorStyles' after 270 ms
[09:02:52] Starting 'libStyles'...
[09:02:52] Finished 'libStyles' after 4.1 ms
[09:03:02] Finished 'php' after 15 s
[09:03:02] Starting 'serve'...
[09:03:02] Finished 'serve' after 6.5 ms
[09:03:02] Starting 'watch'...
[Browsersync] Proxying: http://sitename.local.companyname.as:8181
[Browsersync] Access URLs:
--------------------------------------
Local: http://localhost:8181
External: http://192.168.1.120:8181
--------------------------------------
UI: http://localhost:3001
UI External: http://localhost:3001
--------------------------------------
As you can see, the Local
URL it outputs is not the same as my sitename.local.companyname.as
domain scheme. When it was working, I would just put sitename.local.companyname.as:8181
into the URL bar and it would work the same as `localhost:8181'. But even that doesn't work now.
Here's my dev.browsersync.bypassPort
setup in my ~/local/docroot/wp-content/themes/devfilesroot/config/config.local.json
.
{
"dev": {
"browserSync": {
"https": false,
"proxyURL": "http://sitename.local.companyname.as:8181",
"keyPath": "/etc/letsencrypt/live/local.companyname.as/privkey.pem",
"certPath": "/etc/letsencrypt/live/local.companyname.as/cert.pem",
"open": false
}
}
}
Memory:
Baseline is
Physical Memory: 8.00 GB
Memory Used: 6.26 GB
App Memory: 2.08 GB
Wired Memory: 1.03 GB
Compressed: 2.51 GB
Cached Files: 1.29 GB
Swap Used: 0 bytes
When I run npm run dev
:
Physical Memory: 8.00 GB
Memory Used: 6.60 GB
App Memory: 2.99 GB
Wired Memory: 1.07 GB
Compressed: 1.89 GB
Cached Files: 1.34 GB
Swap Used: 0 bytes
npm run dev uses 23 MB
Gulp uses 252 MB
MAMP Pro uses 261 MB
Any idea what else I could look into?