I'am new to the WordPress and I created WordPress website and configure it within the Wamp Server. The site displays all it's contains locally correctly. Now I want to access that website from the another machine within same network but it did not display all the contents correctly. it displays only the text. no images and the applied theme is not displays. I turn off the firewall and change the Apache configuration file (httpd.config) as follows. but it also didn't work properly. please help me.
Order allow, deny
Allow from all
The problem is that you specify during install that the hostname of the site is "localhost". Unofrtunately when you connect from another computer the link to "localhost" refers to the pc you are connecting from and since in this pc there isn't any server runnin,g you see only the text and not the images or the css.
The solution is to modify the wp-config.php wordpress file and change this from:
define('DB_HOST', 'localhost');
to:
define('DB_HOST', '192.168.0.4');
The problem is with URL of the site. You need to update the URL in database and replace localhost with IP of your machine using phpmyadmin and then that site will be accessible from other machines in your network. Please try this and it will solve your problem.
This is a WordPress oddity. When you install WP on localhost, or anywhere, it stores the url used in the install in its database. It then uses this url internally in its code to build links etc.
So when you come to run this site from another PC, things like image links will be built with the url localhost or localhost/wordpress.
Now when you run this from another PC using a different URL like 192.168.0.4/wordpress localhost will still appear in the links and of course there is no localhost on the client PC. So the links dont work. Its a bit like you have moved your site to a new url, but WP does not know about it.
Read this post on the WP Codex to work out what you need to so to amend the urls in the database. OF course this means you wont be able to use localhost anymore on the WAMPServer machine either.
Related
I've got xampp up and running, copied the files of sikkesautomobielen.nl via FTP to my htdocs, connected my php database and have got my duplicate site working (localhost). When I click on one of the links on the site I still end up on sikkesautomobielen.nl instead of my localhost. I guess it's a database issue. Is there an easy way for me to make the URLs reference to localhost instead of sikkesautomobielen? I'm trying to develop a Wordpress site and when I'm done, I would like to upload it to the server. This way the site has a minimal down time and I can afford myself some mistakes without the "official" site crashing.
It's a database issue. Go to your database( PHPMyAdmin) and under *_options you will find 2 base urls, change them to your localhost url and the site will work.
Change the 'option_value' of both 'home' & 'siteurl'
'*' refers to your selected prefix
I spun up a Windows 2012 R2 Datacenter VM.
Endpoints have ports 21,80,443 successfully added to the dashboard.
Installed Wordpress/PHP on the VM using the Web Platform Installer.
Wordpress site works fine using localhost.
Trying to hit the DNS (mysite.cloudapp.net) or the public IP, shows just the generated version of the site below. Clicking links results in an "unable to connect" error.
Anyone know what I might be doing wrong?
By default, when you finish installing wordpress, the address URL is set to
http:/localhost/wordpress
When you browse your site with DNS, the resources file urls are still referring to like http://localhost/......
So, we need to sign in wordpress admin portal in your VM, click “setting”=>”general”, set “WordPress Address (URL)” and “Site Address (URL)” to http://<your_vm_name>.cloudapp.net/wordpress, and save changes.
If you have any further concern, please feel free to let me know.
wordpress is normally url based, make sure it's configured for wildcard or the cloudapp.net domain.
So one thing you can do is see if you can log into /WP-admin and check the home and url links under Settings>General to see if they match site.cloudapp.net. If they do you might also want to check under your wordpress's theme files in functions.php and add the following lines to the top after <?php
update_option('siteurl','http://example.com');
update_option('home','http://example.com');
I am using my laptop as a test environment for a wordpress website before I move it to an online server. I have this setup with a xampp sever running on the local machine. Wordpress is installed and running a theme which I have modified somewhat. When I navigate to the website from the local machine by going to 'localhost', the website displays correctly, however if I navigate to the website from another device whether it may be a computer, phone or tablet, the website seems to exclude css styling and only displays plain html. Any insights would be appreciated.
I know that with some browsers, sites in your local intranet except localhost are rendered differently. I am not sure whether this is the issue here. I am using Chrome Version 42.0.2311.135 dev-m
When you're accessing the site on another machine, open up the developer tools in your browser and see where the link to your CSS is pointing at.
It sounds like that CSS URL is hard-coded to be pointing at localhost (which would explain why it only works on your machine). It could also be the case that you have set your site's domain to be localhost in Wordpress which may be using that to render the URLs.
Double check your Wordpress settings, and also your theme's code.
I'm trying to set up a wordpress blog hosted from my computer using this tutorial. When I visit the site on the computer it's hosted on, via localhost or the IP of the computer, the site looks fine, but when I visit it from another computer it looks like this.
All Wordpress resources (stylesheets and images at least) use Wordpress' URL configuration. You can find it as the 3rd option down in the General Configuration page of your Admin. This is due to the way that themes are to be programmed and create the header of the blog using the bloginfo function that uses those configuration values to generate the rest of them
What is probably happening is that such URL is using either localhost or 127.0.0.1. If that is the case, when accessing the blog from your own PC it would show fine as both do resolve to the local machine. If you access it from an external PC, they would not resolve to the PC that is serving Wordpress but also to the local PC - which is not able to provide them.
I have installed wordpress on my IIS server using web plaform intaller, everything is working fine when i am working on localhost.
when when i am trying to browse from external or another pc, the links are stayed http://localhost/page.php, which should be http://myserver/page.php
even the styling is not applied because of that.
how do I change the Path and make it work??
Thanks
You will have saved in the database that your site url was http://localhost. To access it from everywhere, I'd use your IP address instead, that way you should be able to see it on your local and external machines.
Do a quick export of your db, open in a text editor.
Find/ replace 'localhost' and change it to whatever your computer's IP is.
Import your changed sql file. Should be all good :)