Skip to content
This repository has been archived by the owner on Sep 16, 2019. It is now read-only.

localhost:3000 shows 2017 theme #1001

Closed
andrewcodes404 opened this issue Jun 12, 2017 · 17 comments
Closed

localhost:3000 shows 2017 theme #1001

andrewcodes404 opened this issue Jun 12, 2017 · 17 comments

Comments

@andrewcodes404
Copy link

Hi, I have a fresh install of wordpress then cloned the repository and install with npm, gone into the wp-admin using MAMP PRO as a host and changed the theme to FoundationPress.

ok no style so I use 'npm install'
When I visit the site from here I get the FoundationPress theme, great

I want to use the browser sync so changed the url in gulpfile.js to 'localhost' and 'npm run watch' but when the localhost:3000 window pops up I get the 2017 theme?

So I trashed the 2017 theme thinking this will force it to show FoundationTheme, but now it's still showing the 2017 theme which is kind of weird

Any ideas?
Thanks
Andrew

Sierra 10.12.5
node v6.10.3
foundation-sites#6.3.1

@linuxbastard
Copy link
Contributor

You may have a vhost or another process running on port 3000 which is serving a WP install.

Have you tried changing ports?

@andrewcodes404
Copy link
Author

where can I change ports in gulpfile.js

@linuxbastard
Copy link
Contributor

linuxbastard commented Jun 13, 2017

According to browsersync docs, you can add a different port:
Change port

@andrewcodes404
Copy link
Author

Ah great thanks, tried that and it changes the port number but still no joy. It's not that it fails to load, it starts trying to load but ends up spinning

@linuxbastard
Copy link
Contributor

linuxbastard commented Jun 13, 2017

localhost right? Apache? so when you go to localhost it gives you the default apache info page?
Are you using vhosts files to run an apache server on a specific folder?
basically I'm asking how you're setup

@andrewcodes404
Copy link
Author

screen shot 2017-06-13 at 10 10 40
I mean this is working fine and you can see there I've changed the port to 8080. But when I try to view localhost:8080 it doesn't load

@andrewcodes404
Copy link
Author

'vhosts files to run an apache server on a specific folder?' I haven't done anything like this, just following the instructions in the docs

@linuxbastard
Copy link
Contributor

linuxbastard commented Jun 13, 2017

The only thing I can think of is to make sure FoundationPress is installed under the "wp-content/themes" folder of the working WP install. When you go to wp-admin (WP Dashboard), FoundationPress is available under themes, right? and you can activate it? Other than that, I can't see why your setup is not working

@andrewcodes404
Copy link
Author

yeah thats all in place but had to change themes using MAMP PRO because obviously I couldn't login in using BrowserSync, thanks anyway

@linuxbastard
Copy link
Contributor

linuxbastard commented Jun 13, 2017

You can create any number of virtual hosts in mamp pro, so how did you set up the one that serves your WP?

@andrewcodes404
Copy link
Author

Just the same as any host in MAMP Pro. Create a new host pointing to the wp directory and create a database with it, open up the host and in the browser finish the installation of wordpress

@linuxbastard
Copy link
Contributor

linuxbastard commented Jun 13, 2017

This is what I get when I run
npm run watch

[BS] Proxying: http://themesite.dev
[BS] Access URLs:
--------------------------------------
Local: http://localhost:3000
External: http://192.168.1.100:3000
--------------------------------------
UI: http://localhost:3001
UI External: http://192.168.1.100:3001
--------------------------------------
[BS] Watching files..

I just visit `http://192.168.1.100:3000` and I get my wp install with FoundationPress loaded.
If I want to change my theme or edit content, I visit http://themesite.dev/wp-admin and log in

@linuxbastard
Copy link
Contributor

This is my gulpfile.js entry at line 17

// Enter URL of your local server here 
// Example: 'http://localwebsite.dev'
var URL = 'http://themesite.dev';`

@andrewcodes404
Copy link
Author

ok yeah it loads when i use the http://192.168.1.75:8080 but it still using 2017theme which is not even in the theme directory. The only theme in the theme directory is FoundationPress

screen shot 2017-06-13 at 12 35 55

screen shot 2017-06-13 at 12 36 04

@linuxbastard
Copy link
Contributor

linuxbastard commented Jun 13, 2017

ahh, but your vhost is pointing to localhost. if clean2 is the directory, you should have a vhost in MAMP pro pointing to it, and you need to add in a new domain. Right now, localhost is just serving up the default mamp vhost, that's why you're not seeing the changes.

So I'm on Ubuntu, I've got themesite.dev which is defined by a vhost file that points to the /var/www/themesite.dev/public_html directory as the vhost web root. Anytime I access themesite.dev, the server shows me what's in the /var/www/themesite.dev/public_html directory. The default apache vhost serves files from the /var/www/html directory, so when you access localhost that's what you see.

@andrewcodes404
Copy link
Author

Success. Of course... it's pointing to local host because I told it to, which set up on MAMP PRO is just a fresh install of wp with 2017 theme... So i just change the gulpfile.js to point to 'clean2' . and it works. Got there in the end thanks for your help @linuxbastard.

@colin-marshall
Copy link
Collaborator

Closing this. Nice help @linuxbastard! (sweet username too!)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants