• I’m trying to change my permalinks from current which are:
    http://twojeflp.webd.pl/aloesnacodzien
    into
    http://aloesnacodzien.pl
    My wp instalation is in public_html/aloesnacodzien directory.
    I hardcored the settings with
    ‘define(‘WP_HOME’, ‘http://aloesnacodzien.pl’);’
    ‘define(‘WP_SITEURL’, ‘http://aloesnacodzien.pl’);’
    After that the main site is working but I get 404 error on other pages.
    I tried to delete the .htaccess file and replace with new empty one. Then I added:

    ‘# BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /aloesnacodzien/
    RewriteRule ^index\.php$ – [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /aloesnacodzien/index.php [L]
    </IfModule>’

    # END WordPress

    but still I get 404 error, can anybody give me some advice?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Take a look at the wp_options table in your database at the entries under option_name for “siteurl” and “home”, and see whether they reflect the changes you made. If they don’t, you can change those manually to the desired root address.

    Moderator Jan Dembowski

    (@jdembowski)

    Forum Moderator and Brute Squad

    I hardcored the settings with
    ‘define(‘WP_HOME’, ‘http://aloesnacodzien.pl&#8217;);’
    ‘define(‘WP_SITEURL’, ‘http://aloesnacodzien.pl&#8217;);’

    Backup everything (just in case) and try this:

    1 – Make a copy (not a move) of all the files and directories from public_html/aloesnacodzien into public_html/.

    2 – Make sure there is no index.html file in public_html/.

    3 – Comment out those two define( lines.

    4 – Log into your installation and change the WordPress Address (URL) and Site Address (URL) to http://aloesnacodzien.pl.

    And then visit your site. Is it now working referencing the new location?

    Thread Starter szymonfortuna

    (@szymonfortuna)

    Just for the record, i solved the issue. It was easy. For everybody who’s got similar issue:

    I defined site url in wp-config
    ‘define(‘WP_HOME’, ‘http://aloesnacodzien.pl&#8217;);’
    ‘define(‘WP_SITEURL’, ‘http://aloesnacodzien.pl&#8217;);’

    I created a new .htaccess file and pasted the following code.
    ‘# BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase / [foldername optionally]
    RewriteRule ^index\.php$ – [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /[foldername optionally ]index.php [L]
    </IfModule>’

    What is the most interesting, I found on some other posts missleading form me information that when your site is not in the root but in some folder, like it was in my case, you had to add the folder name into the code above. That is why it wasn’t working for me. So try to edit the file both ways and check the results.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Need help 404 error when changing permalinks’ is closed to new replies.