Jump to content

Changed Port number on WP site it's now broken


Anonymous123

Recommended Posts

I changed the port number on my Word Press site because my isp blocks port 80 so I changed the port in apache conf to 8080 and now some of my images don't load. I think the port change interfered with mysql in some way. I haven changed mysql just apache. The site loads when I type http://xxx.xxx.xxx:8080/and the admin site loads too. What should I do?

Link to comment
Share on other sites

I don't think it's a MySQL issue since that operates on port 3306. My guess is you may need to change something else in the configuration or change your references to images in your HTML/CSS/JavaScript etc. Whereas the page loads over 8080 the images may be trying to load over port 80 which is being blocked by your ISP. If you use relative URLs for all of your media this problem should go away. Unless if you are already doing that then look deeper in the configs.

Edited by sud0nick
Link to comment
Share on other sites

By default, http runs on port 80. If you changed the web servers default port, you will need to always type the port into the URL from now on. As for images not loading, wordpress by default will drop the site.com:80 in default to HTTP, and also not use :443 for https since these are default ports that use http and https. For 8080, you will have to put a rule in htaccess to rewrite all images and files, or possibly change the wordpress admin panel to reflect the port, but I'd start with htaccess for port changes

Try something like:

RewriteCond %{SERVER_PORT} ^80$
RewriteRule ^ http://%{HTTP_HOST}:8080%{REQUEST_URI} [P]
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...