Ask your WordPress questions! Pay money and get answers fast! (more info)

WP-admin redirecting to 404 page WordPress

  • SOLVED

Hi Guys

I have just uploaded this site from a back up a previous developer gave me using Backup buddy, had a few issues with it so deleted the .htaccess file so WP would generate a fresh one.

But i still keep getting these 404 messages. I cannot log in via wp-admin as it keeps going to the 404 page.

Usually when I encounter this issue I just log in and save the permalink settings as default to flush the permalink structure and all is well. But not with this one.

http://216.172.174.87/~wiredin/

Can anyone give me an idea of where to trouble shoot?

Many thank
Steve

Answers (2)

2013-04-30

Dbranes answers:

What happens if you add this into your <em>.htaccess</em> by hand?

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


can you then acess the <em>wp-admin</em> ?


Steve Watson comments:

Still the same after adding your .htaccess code.

I cannot access /wp-admin as it redirects to 404 page

I can access the folder wp-admin via ftp


Dbranes comments:

Here is an idea:

To flush the rewrite rules by hand, you could try to add this into your <em>functions.php </em>

function my_flush() {
flush_rewrite_rules();
}
add_action('init','my_flush');


and try this in your <em>wp-config.php</em>

define("WP_SITEURL","http://216.172.174.87/~wiredin");
define("WP_HOME","http://216.172.174.87/~wiredin");


Steve Watson comments:

Ok i've added the flush code to the functions.php file

I've done site and home url in the myphpadmin area..

http://screencast.com/t/prZujseFK0Y

I've also managed to change the permalinks back to default via myphpadmin

This has got the other links on the site working but i still can't access wp-admin

On a side note: The images are not showing either so i copied one of the links to see what was going on...

http://216.172.174.87/~wiredin/wp-content/themes/wpprolocal-new/timthumb.php?src=http://216.172.174.87/~wiredin/wp-content/uploads/2012/10/Community-Support.jpg&h=144&w=208&zc=1

Not sure if that's relevant.

Any thoughts?
Steve


Steve Watson comments:

Ok i've just deactivated the plugins by renaming the plugin directory and I'm now in!

I think I can now sort it from here.

thanks for your help Dbranes :)


Dbranes comments:

ok great, renaming the plugin directory is a good trick ;-)

I checked the image

http://216.172.174.87/~wiredin/wp-content/uploads/2012/10/Community-Support.jpg

and it's working. But when I add parameters to it, there is a 404:

http://216.172.174.87/~wiredin/wp-content/uploads/2012/10/Community-Support.jpg&h=144&w=208&zc=1


One can also define the external domains in timthumb.

ps: just make sure you are using a new timthumb version ;-)




Dbranes comments:

ahh, I see the problem, missing ? ;-)


Dbranes comments:

so this is working:

http://216.172.174.87/~wiredin/wp-content/uploads/2012/10/Community-Support.jpg?h=144&w=208&zc=1

You should try to add 216.172.174.87 to the array <strong>$ALLOWED_SITES </strong> :

[[LINK href="https://code.google.com/p/timthumb/source/browse/trunk/timthumb.php"]]https://code.google.com/p/timthumb/source/browse/trunk/timthumb.php[[/LINK]]


Dbranes comments:

ps: it looks like TimThumbs isn't supporting IP numbers.


Steve Watson comments:

Hi Dbranes

unfortunately I dont really understand what you are saying we are in territory I am not used to.

What I do know is that the images for the blog and testimonials page are all added via the featured image function. I tried to remove and reinstall them via the same method but still no joy.

The tim thumb stuff is way over my head and so is the array $allowed_sites stuff.

I've taken this site over from another developer who let the client down, do you think these issues arise from a dodgy theme and coding?


Dbranes comments:

It looks like TimThumb doesn't support addresses like

123.123.123.123/~sitename/

but only domain names ;-)

Found some pages about it:

http://www.wpeka.com/timthumb-usage-things-to-take-care/

http://pexetothemes.com/support/knowledgebase/timthumb-not-resizing-images/


So I think that could explain the image problems you have ;-)

2013-04-30

Yakir Sitbon answers:

You can PM me and I will setup your data.
I think it's problem with your site domain, but please contact with me in my PM.

Yakir.