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 :)
Related
I uploaded a php script to a subdomain that I own, for testing and customizing purposes before it goes live (I had planned on moving everything over to the root domain when done).
Someone then suggested that I work on in Xampp instead as it is all locally installed and therefore much faster, etc.
Thing is, I had already customized the script a lot (mostly CSS but also uploaded graphics via the admin panel, etc) while it was up live on the web host, so I would like to run a copy of the most up-to-date version of it in Xampp and continue customizing it from there.
I downloaded a copy of all my files by FTP into htdocs > Test folder. I also downloaded a copy of the database via phpmyadmin and imported it via phpmyadmin into my localhost.
The big problem I have is when I try to access the scritp via localhost, the url immediately reverts back to the live url. How do I set it to link to the local host copy instead?
Thanks.
Based on AbraCadaver's suggestion, I found the answer lied in changing the URL parameters in config.php
Thanks
So ive been using xampp for a virtual server for an app ive been making. I dont know much about xampp but its been working fine all along. I have been using my php files in the htdocs folder. Today the ip address changed from 192.168.64.2 to 192.168.64.3 and now all my files are missings. Is there any way to recover these files. I'm using a Mac Book.
Any help at all is appreciated
Don't use your network internal IP. You are using DHCP and it's gonna change periodically. Just use http://127.0.0.1 or http://localhost. If you had your website URL declared as http://192.168.64.2 at some config file, just replace it for the values provided above.
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.
I’m trying to make access to my MAMP localhost from my mobile phone and other Windows PC. I’m currently using a Mac.
While I can see the database content but the website doesn’t render as usual (no images, stylesheet, etc…).
Therefore I assume the other PC can access the database but can’t use the files. Maybe the PHP files are not processed?
Does anyone have a suggestion on what could be the cause and how to fix it?
However I can see the database content but the website doesn't render
as usual (no images, stylesheet, etc)
Does your site on the MAMP install use hardcoded URLs for CSS, images & JavaScript? Something like this:
http://localhost/images/a_great_image.png
If so, when a remote host accesses your site, they will not be able to see the content on URLs like that since they will be pointing to localhost and localhost is an address directly connected to the local machine. Meaning that any machine will only see localhost as their actual machine; never a remote machine. It’s a loopback hostname for testing & restricted local access.
The two solutions you have is to do the following:
Change the localhost address to be the IP address of your computer on the network. So if your computer is reached via the IP 10.0.1.3, then the URL would be: http://10.0.1.3/images/a_great_image.png.
Change the URLs to be relative URLs such as /images/a_great_image.png and maybe use base tag like this <base href="http://10.0.1.3/" target="_blank"> on each page. That way all your links in URLs are relative, but the base is set once & is always http://10.0.1.3/.
I'm new to PHP and everything, so I'm trying to learn some things.
I'm currently developing my first PHP site in Dreamweaver using MAMP and Localhost.
I have already bought my domain name, and built a smaller html site just to act as a "holding site" before the PHP one gets put up. I'm wandering if instead of using localhost, that I could use a subdomain of that domain. So instead of going to localhost/mysite I could go to test.mysite.com.
Tell me if I'm wrong, but I shouldn't have to upload any files to GoDaddy because I'm using MAMP as the server. Right?
Keep in mind, this isn't permanent. I'm not planning on hosting my site on my computer using MAMP. I'm just wandering if it's possible and how to do it if it is.
Any suggestions, comments, or answers are greatly appreciated.
Thanks.
- Ryan
MAMP is not the server. MAMP adds server capabilities to your computer, but you can't use MAMP to mimmic any server.
What I recommend you is working on your computer, with MAMP and using localhost as the "test address". After the page is finished in your localhost, and everything work fine, you can upload your page to your server (with FTP). This way you avoid having to upload your files via FTP every time you make a change in your code.
And welcome to the PHP World. Countless mugs of coffee and restless night await you.
You can create some folder on web server(on your paying hosting) and upload all files from your test localhost folder. Everyting would work perfectly if you type: https://yourwebsite.domain/yourfolder. If you want to set it to view like http://yourfolder.yourwebsite.domain you must from Control Panel set up an some subdomain. Subdomain is make something like this: you enter name of subdomain and folder which is mapped to that subdomain. For example, you set up subdoman http://test.web.com and map that to http://web.com/testfolder.
I hoppe that I help you.