What I have: as title suggests I set up a WordPress installation on my local machine and can run it and visit it (Mac + MAMP) over localhost:8888/myBlog
. It works fine. By sharing my IP I am able to reach the WordPress blog from another computer (myIP:8888/myBlog
). But here is the problem.
The problem: the page loads, but not the .js, nor the .css. By inspecting the console I see six ERR_CONNECTION_REFUSED
for js and css files coming from wp-content (.css and .js of a theme I installed) and from wp-includes (again .css and .js files).
What I tried: I thought it was a problem of permission so I changed the main folder and all the files recursively with chmod -R 575 as suggested somewhere but the problem persists.
Thanks!
What I have: as title suggests I set up a WordPress installation on my local machine and can run it and visit it (Mac + MAMP) over localhost:8888/myBlog
. It works fine. By sharing my IP I am able to reach the WordPress blog from another computer (myIP:8888/myBlog
). But here is the problem.
The problem: the page loads, but not the .js, nor the .css. By inspecting the console I see six ERR_CONNECTION_REFUSED
for js and css files coming from wp-content (.css and .js of a theme I installed) and from wp-includes (again .css and .js files).
What I tried: I thought it was a problem of permission so I changed the main folder and all the files recursively with chmod -R 575 as suggested somewhere but the problem persists.
Thanks!
Share Improve this question edited Mar 23, 2020 at 11:53 Masiar asked Mar 23, 2020 at 11:39 MasiarMasiar 1134 bronze badges 4 |1 Answer
Reset to default 1As discussed in comments, the problem was that the site address was set to localhost:8888/myBlog
. This is the URL WordPress is expecting your clients to be using, and uses this to generate fully-qualified URLs for scripts and CSS etc. Hence your other clients were trying to load scripts and CSS from their own localhost.
The fix is to set the correct URL, http://myIP:8888/myBlog
, as the 'WordPress Address' and 'Site Address' under Settings, General.
http://myIP:8888/myBlog
– Rup Commented Mar 23, 2020 at 11:56