Reputation: 97
I was developing a Wordpress theme using Gulp & Browsersync normally. But now I can't access to the homepage : It says something like 'can't redirect'. Still, I can access to the back-end (wp-admin).
Everything was OK until I had to change the Site title (through back-end > Settings > General).
//localhost:3000/mysite
, I don't know how it was set that way.http://localhost:3000/mysite
.//localhost:3000/mysite
again directly in the database. Then, I couldn't do anything (go to either front-end or back-end).http://localhost:3000/mysite
in the database and clicked twice to save Permalinks : But this didn't changed anything.When I change the Home + Site URL to http://localhost:8888/mysite
, everything is working well.
I guess it's coming from BrowserSync who was able to set the port to 3000.
Here is my gulpfile about BrowserSync, I'm proxying the 8888 port as I'm using MAMP :
/****** BrowserSync ******/
const server = browserSync.create();
export const serve = done => {
server.init({
proxy: "localhost:8888/humblyhealthy", // put your local website link here
snippetOptions: {
ignorePaths: "wp-admin/**"
}
});
done();
};
export const reload = done => {
server.reload();
done();
};
Upvotes: 0
Views: 1063
Reputation: 97
I managed to solve the issue by updating the Home + Site URL to http://localhost:8888/mysite
in the database.
And I added http://
to proxy on my gulpfile.
server.init({
proxy: "http://localhost:8888/humblyhealthy", // put your local website link here
I think it re-initialized the browsersync server after that.
Because, now when I go into the back-end to Settings > General : Home & Site URL are now automatically set to //localhost:3000/humblyhealthy
.
Upvotes: 0