Local host WordPress theme are broken due to port issue - php

I'm using 'MAMP for windows' to install and develop wordPress in my Local Windows 10 machine. The port which my Apache is listening to is localhost:8888. I'm successfully able to install WordPress in my local machine and login to my dashboard.
As you can observe from the below 3 screenshot. All my theme images and CSS are broken. The reason I found out(and highlighted) is that the all my theme related files are not taking the port address and it is referring to localhost, instead of localhost:8888/
I have my httpd.conf listening to localhost:8888
I've my Git configured with Openshift and hence my theme and plugin folders are moved from WordPress folder to .openshift folder. My wp-config is updated to reflect the same.
I'm not sure what I'm doing wrong here. Please throw some lights on this issue.

Finally got this issue resolved and saved a lot of time.
I just have to append the port number to the http server in the wp-config.php file.
define( 'WP_CONTENT_URL', 'http://'.$_SERVER['SERVER_NAME'].':8888/folder' );
Thanks to my friend Amit for helping me out.

Related

WordPress on localhost can not be reached

I am using wamp to host a local version of my WordPress site. It was working gine until I restarted my computer and now I get this error.
This site can’t be reached
The connection was reset.
I tried restarting the services, and creating a new copy of this site under I different folder and the error still persists. My other non WordPress sites work fine.
Not sure what is going on so any suggestions would be great.
If you've moved your site to a different folder then the root has probably changed. Go to Preferences > Web Server and click on the folder next to Document Root, and navigate to the root directory that has your site then click on Select.
Also, make sure Apache and MySQL servers are running. Hope this helps.
You might have changed your port number from default port number.
Open with the port number that apache server is listening.
In your browser give "localhost:portNumber/WordPress"
Example: localhost:80/wordpress or
localhost:8080/wordpress or
localhost:8081/wordpress.
You Can check your port number from apache part config file.
Watch this video: https://www.youtube.com/watch?v=blmOFr8uZQI
I think its plugin issue from the codebase. Just rename the plugins name one by one in (wp-content/plugin/) folder and check.

Wordpress localhost redirect

I recently moved an WordPress installation from server to my computer. On server it was running on port 80 but on my localhost I use 8080. When I try to access http://localhost:8080/wordpress it redirects me to http://localhost/wordpress.
I found a setting named siteurl in the options table and changed that but it did not do the trick. Anyone know where i can change this setting?
I dont use WordPress, but for what I know about WP is that you have a Config part (web) that you can change that type of settings. So, maybe is the database that you have to search where is that port and change it to 8080, because it is forcing it to use 80.
Here you go with a little search in google: Solution
if you are going to install Wordpress on your local computer then you need to change website-name to your localhost-path before importing sql file. otherwise it will redirect you to your website
The problem was more complexed than I imagined. I went through a lot of "move wordpress site" tutorials until it worked. Guess replacing all the links in database from domain name to localhost/wordpress did the work.

How to make xampp local wordpress installation public?

I installed XAMPP and WordPress along it. Created a database and installed the platform all along. Opened the needed ports (8080) so it's publicly accessible also before that. It works.
The problem is that the I can't reach http://IPaddress/wordpress/wp-admin from an outside computer.
I can reach http://IPaddress:8080/xampp/, but thats the only page it will allow me to open. For the rest I get timeouts, unreachable.
I'd appreciate if someone tells me how do I make the C:\xampp\htdocs\wordpress folder accessible publicly just like the /xampp one. Do I need to set some special permissions?
I recommend you next:
You should move Wordpress folder to htdocs.
Change apache port to 80, not 8080.
Open 80 port in your router to your host, example: 192.168.1.32
Change wordpress folder permissions.
Try http://IPADDRESS/
Anyway your solution is also in google.

Netbeans PHP - I can't see my web server

I have a wordpress website on my WAMP server, which I made as a project in Netbeans IDE. Everything was working fine untill I changed the name of my PHP project from 'stickpeg' to 'portfolio'. Now when I try to run my project by clicking the green arrow on the menu tab, it displays me a page saying...
Not Found
The requested URL /wordpress/ was not found on this server.
Apache/2.4.9 (Win64) PHP/5.5.12 Server at localhost Port 80
I'm thinking that the error is something to do with my NetBeansProjects folder, as it's not in my wamp folder at all, but in my documents folder! Plus, the project folder in the NetBeansProjects folder is called 'portfolio', which has 3 other folders inside it called config, public_html and test, which are all empty.
Please help, I just want to be able to see my wordpress website running in my browser again.
You have to put the files in the htdocs directory. Apache (e.g. your WAMP server) can't find the files, since there are in the My Documents folder.
Just move the directory wordpress to C:\wamp\htdocs\wordpress (for example).
Never mind. Sorted it out. Apparently I had to change the Site Address URL and WordPress Address (URL) and then go into netbean's project properties -> run configuration and change the project url.

Why is Wordpress outputting phpinfo() when I try and go to a page?

I have just moved a Wordpress install from a remote host to run on my local development machine. On the remote server it's fully functional.
However, on my development box I can only load the homepage. Other URLs just load a standard phpinfo() page with no errors.
Does anyone know what might be causing this?
It sounds like you are using MAMP or WAMP on your dev box, which will load a default vhost showing phpinfo for any page that does not exist.
Inside wordpress, the settings, in the DB, it sounds like you have Url's "hardcoded" like "http://www.mysite.com" which are not working locally because your "dev" Url is something like "http://localhost"
Whenever using a development server, especially with wordpress, you should setup you dev server as close to your production server. This means you should edit your host file to make it so "http://www.mysite.com" actually goes to your development box or localhost. That way you are viewing everything as it will be when it goes to production.
I had this problem as well following the hosting company re-installing an SSL certificate.
I did some searching and really only found this thread which give me the idea there was a 404 error hiding there somewhere so I checked the php_errors.log file (which I found in the root folder of my site in FTP) - opened that in notepad and found many errors such as:
PHP Fatal error: Class 'WordPressHTTPS_Module_phpinfo' not found in /var/www/vhosts/mywebsite.com.au/httpdocs/wp-content/plugins/wordpress-https/lib/Mvied/Plugin.php on line 385
So - indeed a missing file in the wordpress-https plugin.
To correct, I renamed the folder which contained that plugin (eg wp-content/plugins/wordpress-https to wp-content/plugins/wordpress-https-disabled) - effectively disabling the plugin.
This then allowed me to login to the wordpress admin, install the latest version of that plugin - which worked fine and then deleted the old folder (wordpress-https-disabled)
Everyting was good as gold after that
Hope that helps someone :)
open httpd.conf in text editor
Change;
AllowOveride none
To;
AllowOveride All
I had the same challenge when I cloned my remote site locally.
I fixed it by checking the .htaccess file and correcting this line to point to the right project folder:
RewriteRule . /wordpress/index.php [L]

Categories