1

I am very new to Wordpress but was given a task to retrieve WP driven website.

At first I worked on localhost and managed to fix it - the only thing that did not work was the custom permalink (set to 'postname'). The site only works good locally if permalinks are set to 'default'.

Anyway, I decided to put the site to test on server. I only managed to view main site - and only when permalinks are set back to 'postname'. All other sites redirect me to http://0.0.0.0/postname and give me 'ERR_ADDRESS_INVALID'... However when I manually enter e.g. http://mysite/?page_id=1 it appears just ok... It made me really confused.

WP-admin works ok.

My .htaccess file is standard:

`<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>`

Have you got any suggestions?

agat
  • 11
  • 2
  • 1
    I think this is a problem with your siteURL. You could check out https://codex.wordpress.org/Changing_The_Site_URL to see if it resolves your issue – Niket Pathak Mar 01 '17 at 16:20

2 Answers2

0

In the "wp_options" table are two options which need to be changed. "home" and "site" have to be set to your new domain:

I attached an image for clarification

Reduxx
  • 604
  • 4
  • 8
0

First of all, just make sure that Mod_rewrite enabled on your server check this answer!

And the solution for the redirection to this http://0.0.0.0/postname is to update site url and home url at the database there's 2 ways for this.

  1. If you have access for phpmyadmin, you can go to "wp_options" table and update "siteurl" and "home" with your new domain.
  2. Update it through wp-config.php at the root folder of your project. define( 'WP_SITEURL', 'http://your.domain' ); and define( 'WP_HOME', 'http://your.domain' );
Community
  • 1
  • 1
abdallah Nofal
  • 1,077
  • 8
  • 13
  • Hey, thanks for answer. I've asked my admin to check and Mod_rewrite is enabled. I've also already done another two steps that you mentioned. Neither is helping :( – agat Mar 02 '17 at 08:08