WebFaction
Community site: login faq

After a bit of to-and-fro getting the right directories, various passwords, permissions, sorted out - and dropping existing tables etc. I finally got the XCloner process to migrate an entire wordpress website from its original place onto webfaction. Files and databases.

Yay for me...

However - when I access the top level - all is good I see my page. but all links are:

Not Found The requested URL /wp/index.php was not found on this server.

There's my hint. its says its looking for wp/index but when I migrated it I put everything under the top level location. E.g. I created a Wordpress app and put it at the root of a new website.

So how do I fix this - where in php hell is this initial indirection ? If I just move all my files under a new wp subdirectory - then I'll need to point the entire site down one... Which method should I choose - is there a simple long term stable fix ?

The law of unintended consequences is fooling with me.. again...

asked 10 Oct '11, 23:38

Neon22
3124
accept rate: 0%

edited 10 Oct '11, 23:40

answer below. (.htaccess) and fix (easy)

(11 Oct '11, 01:11) Neon22

Hi,

This can happen if the site URl is not set correctly. You can correct it using:
http://docs.webfaction.com/software/wordpress/troubleshooting.html#wordpress-links-point-to-the-wrong-domain

permanent link

answered 10 Oct '11, 23:47

neeravk
1.5k3412
accept rate: 41%

The primary method suggested says to delete my database and remake it - Alas I can't do that and migrate the site.

So secondarily it suggests editing the wp_options table directly in phpmyAdmin and changing all the incorrect locations to be correct. (I found 4) I have done this but there is no change... mystified sadness...

(11 Oct '11, 00:40) Neon22

ok. looks like my .htaccess file has the rewrites in it. I am not sure how to change it so it works

If I remove it altogether then I get /31 instead of such things as /blog

If I comment out the redirect (as below) then it doesn't work either. I guess I need to research .htaccess and mod_rewrite...

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

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

# END WordPress
permanent link

answered 11 Oct '11, 00:51

Neon22
3124
accept rate: 0%

What is the purpose of using RewriteBase /wp/ here? Why not just RewriteBase / and rewriting to the index.php directly (instead of /wp/index.php) ?

(11 Oct '11, 00:55) ryans ♦♦

OK - turns out to be easy to fix... :-)

Just go into the admin on your wordpress website - navigate to Settings and under that Permalinks. There will be a setting already. Change it - save - change it back - save.

This will rewrite the .htaccess file with the correct rule.

Then its all sorted. !!! :-)

FYI the final rule looked like this:

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

# END WordPress

I can't tell you how happy I am not to have to get a grip on .htaccess and the rewrite rules.

permanent link

answered 11 Oct '11, 01:06

Neon22
3124
accept rate: 0%

edited 11 Oct '11, 01:09

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×44
×1

question asked: 10 Oct '11, 23:38

question was seen: 4,044 times

last updated: 11 Oct '11, 01:11

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2019 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM