Solved

Accessing Wordpress install on local host

Posted on 2011-09-13
9
447 Views
Last Modified: 2012-06-22
I run a computer lab at an elementary school and am hosting a wordpress site on a local machine running Snow Leopard Server running on a 2009 Mac Pro. The site is set up and works fine when I access it from the server, but when I connect from any other machine on the local network, I can see the unformatted content, but that's it.

I have the apache preferences set on the hosting machine for the default OS X server webhosting directory (/library/WebServer/Documents) and the wordpress site is installed in that directory. I used MAMP to install Apache, mysql and PHP, I downloaded the most recent version as of a few days ago. I'm running the latest version of wordpress (3.2.1). I've tried browsing with safari and firefox, but no luck with either. The web address I use is: http://10.72.32.66:8888/wordpress. That's the correct ip address for my local server and the :8888 is the local host port number, 8889 is the mysql port number.

Inside wordpress I'm using the generic twentyeleven theme, but I've tried a couple other installs just to see if anything different happened. Even brand new, fresh installs of wordpress show up the same way on other machines in the lab--basic content, no formatting.

If I type in that web address on any other machine in the computer lab, it brings up the title of the blog, the list of pages, the titles of the posts, but all of the content is unformatted. If I click on any of the links to the other pages, I get a message saying it can't connect to the server at localhost:8888. If I type in an address for a specific page (http://10.72.32.66:8888/wordpress/teacher) I get the content for that page, but again, no formatting. I have a linux machine in the lab as well and the same happens when I use it to browse the wordpress site.

If I just type in http://10.72.32.66/ I get an index.html file that lives in the /library/Webserver/documents directory. Default permission for those directories is set so that everyone can read. If I type in a web address http://10.72.32.66/images (a folder I created to test permissions) I can see the contents of the folder and load any pictures I put in there.

The machines in the lab are 3 year old iMacs and some brand new iMacs. Both machines get the exact same result when I try browsing the wordpress site as does a linux machine. I have a feeling it's some dumb little setting somewhere, but I'm not sure what it is. Any help would be greatly appreciated  --  Rick
0
Comment
Question by:rickoxo
  • 5
  • 3
9 Comments
 
LVL 23

Expert Comment

by:jeremyjared74
ID: 36533630
I've found this on the WP Forums that was resolved. It seems similar to your error. Instead of posting all the details here I'll give you the link:
http://wordpress.org/support/topic/mamp-blog-viewable-by-admin-at-httplocalhost8888-but-not-by-site-visitors
0
 

Author Comment

by:rickoxo
ID: 36533709
Thanks for the link. I read through what they wrote, but they never really  resolved the issue and the situation was a bit different. They were struggling with database access, whereas I can see the content of my locally hosted wordpress website from another machine on the network, but it's just missing any formatting. I tried searching all over the WP forums, but I couldn't find anything and the MAMP install directions don't even mention how to access the website from another machine.
0
 
LVL 23

Expert Comment

by:jeremyjared74
ID: 36533735
The one thing I noticed was it seems you use a different path to your installation that what was suggested. In the forum it also suggested using localhost in the url. I don't know from experience, so it's only a guess. I'll look for other useful info and post it if I find anything helpful.
0
Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

 

Author Comment

by:rickoxo
ID: 36533955
If I use localhost in the url, it tries to resolve localhost for that machine, and that machine doesn't have localhost defined, so it says it can't find the file. If I use the ip address and the port, :8888 that gets me to the correct location, I can see the content, but somehow the path information isn't working for the css file, and any other wordpress files that do the formatting. If I do http://10.72.32.66:8888/ it opens the index.html file in the root folder and displays that. So the url seems to be getting me to the right place, it's what happens after that that seems to be not working right.
0
 
LVL 23

Assisted Solution

by:jeremyjared74
jeremyjared74 earned 100 total points
ID: 36534511
If you use firefox, you can install the plug-in called WebDeveloper. With the plug-in installed you will have a new toolbar. In that toolbar you can go to CSS>View CSS. It will pop up a window that shows the path that it thinks contains the CSS files. It is useful when trying to track these errors down. I'm not sure that's the fix but It may shed a little light. I have a feeling it has more to do with the wp-config.php file and the abspath (setting at the bottom of the file. It's probably that or the .htaccess file if one is used with MAMP.
0
 

Author Comment

by:rickoxo
ID: 36534860
I think that's what's going on as well. I have Safari on the iMacs and it lets you view source, and I just looked at it quickly but couldn't see what was wrong. I was googling around trying to figure this out and someone else mentioned the .htaccess file, so tomorrow I'll check it out and give it a try (the machine is at school and I can't access it remotely).
0
 
LVL 10

Accepted Solution

by:
EdTechy earned 400 total points
ID: 36536144
I had this problem and I can offer a little direction but I don't remember the specifics. It has to do with your paths in General Settings under WordPress address URL and Site Address URL. BE VERY CAREFUL. I hosed my access several times and could not get back in and had to reinstall.
Following the link next to Site address may be helpful. Sorry I can't offer more specifics. It has been awhile since I dealt with this.
0
 

Assisted Solution

by:rickoxo
rickoxo earned 0 total points
ID: 36555075
I ended up posting on the wordpress site and even there no one knew the answer, but it did have to do with the site URL's that you can set under settings/general. Once I changed those to the ipaddress of the server instead of localhost, it all worked perfectly.

http://10.72.32.66:8888/wordpress 

This did the magic, thanks folks here for suggestions.
0
 

Author Closing Comment

by:rickoxo
ID: 36579012
This info should have been part of the MAMP install directions, not everyone uses that just for local site testing ...
0

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Contact Form 7 Error 4 35
WordPress Madness 8 36
Wordpress Cherry Theme Shortcodes 6 31
Web site: http forwards to https causing 301 errors - SEO issue? 26 37
So you have coded your own WordPress plugin and now you want to allow users to upload images to a folder in the plugin folder rather than the default media location? Follow along and this article will show you how to do just that!
I annotated my article on ransomware somewhat extensively, but I keep adding new references and wanted to put a link to the reference library.  Despite all the reference tools I have on hand, it was not easy to find a way to do this easily. I finall…
The purpose of this video is to demonstrate how to update a WordPress Site’s version. WordPress releases new versions of its software frequently and it is important to update frequently in order to keep your site secure, and to get new WordPress…
The is a quite short video tutorial. In this video, I'm going to show you how to create self-host WordPress blog with free hosting service.

820 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question