Thread Starter
Kjetil
(@kjetilgf)
PROBLEM!
Followed my own setup in detail. After clicking save (step 2) i got an error, which should be OK. Then, after moving the two files and trying to log in:
1st result: Admin panel looks like it’s lost contact with the CSS.
2nd result: Same for the site.
3rd result: Lost contact with the admin panel.
Ideas?
– would be much appreciated
Kjetil
PS I might move back in the old html site. If so, there is a grey news ticker below the main image which is not present in the WP version.
move *all* the wordpress files into the root… this whole “keep them in a subdirectory” thing is pointlessly complicating a very simple issue.
You’ve changed both settings to remove the subfolder, now just get all the files out of that subfolder, and into your web-root.
btw, if you DON’T want to do that, then you should keep step 1 of your process with the subdirectory in place.
… I don’t think that’s the best solution though.
Thread Starter
Kjetil
(@kjetilgf)
Wow – I must say, Ivovic – this was a quick response on an urgent matter.
It didn’t solve my problems, though, so I must have missed something.
What I did:
a – Moved all files from the wp directory to the root
b – edited the index.php file back to its original
c – checked that the .htaccess file was in place and with 777 permissions
d – tried to get access to the admin panel with dolcevita.no/wp-login.php and http://www.dolcevita.no/wp-admin/ …but just got a 500 internal server error.
e – I also tried to replace the .htaccess with a fresh writable file. No luck.
Any easy solution, or should I just remove all wp files (appart from the content folder) with a fresh install?
Thanks
PS – If you wouldn’t mind, feel free to skype me on kjetilgf – there are a couple of beers waiting.
I’m sorry, due to the beers actually present in the room, I don’t do live chat 😉 – but I do respond fairly quickly.
did you move the subdirectories as well? is /wp now empty (or better yet, gone?)
instead of making an empty htaccess, have you tried just deleting it?
I can’t see any problem with the steps you performed above… if you did actually change the two URLs in the options the way you said you did.
if you do the two things I’ve said above, and it still doesn’t work – I’d suggest you may have files lost in the move – in which case, wipe the web root and upload some new files – your posts will be fine in the database where they are.
if it *still* doesnt work, we might need to get our hands on phpMyAdmin and change those options URLs manually.
the fact that *every* url I enter, even to files I know should be there, generates a 500 error, suggests a crapped-up htaccess file.
nuke it.
…
whatever you did just then had a positive effect 🙂 — however, your permalinks are still pointing to /wp/* suggesting that the URLs have not actually been changed in the options.
Thread Starter
Kjetil
(@kjetilgf)
Thanks again
Seems like i’ll have to make a fresh install.Deleting the .htaccess file didn’t help.
About the URLs, I’m just 90 % sure about them, as I first (after your initial tips) tried to alter the wordpress url back to /wp – it was the last thing I did before i lost contact with the (already messed-up) admin panel. Don’t know if it was saved.
What’s eventually the phpMyAdmin options i would have to alter? i thought that part just takes care of where the database is located?
PS
The /wp directory is empty, just a folder in there that i can’t delete. Sure it doesn’t matter
your site is no longer generating ‘500’ errors, so *something* you did then did work (I’m guessing the deleting htaccess part).
if you have access to phpMyAdmin, then in the wp-options table, find the entries for “siteurl” and “home” and change them to your web address without the /wp (and without a trailing slash).
if you can’t get into the wp admin, this is the way to do it now.
Thread Starter
Kjetil
(@kjetilgf)
Site’s up. Only – many images are gone.
– First I deleted the htaccess file, then tried to login using an other browser (Safari). Don’t know why i couldn’t access from Firefox; cache must be hard to really delete maybe.
– Second, I’ve tried to update permalinks – still the same.
I guess it’s a question of paths. Most of the images in the site are “imported” from the html version of the site. That is, they’re not inserted via the WP interface but copy/pasted into the wp pages/posts (using the code from the html site). No files from the html site are moved/ deleted. It seems like these are found while those uploaded through WP are “lost”.
Any easy way here?
Close – I hope 🙂
PS
I would guess the standard upload location should still work?
wp-content/uploads – haven’t touched it
yep, any hard paths in your posts will need to be changed – you can do that easily enough with a “search and replace” plugin – there are a couple of those available.
most of the issue is with your theme though – you have a LOT of hard-coded paths in your navigation… consider using relative links if you’re going to hard code them.
… generally speaking, you’re done… there’s just cleanup work to follow, but most of everything works once you get past the fact your navigation links are all broken.
the uploads location will work fine – but you can actually specify that in your admin options, so make sure its pointing to the right place.
Thread Starter
Kjetil
(@kjetilgf)
Thanks – you’ve been of great help.
Could I solve the whole image path part just by moving files back into the wp directory – following the procedure here?
Situation now:
The actually hard-coded paths work fine. They refer to images used (and uploaded) when i once made the html version of the site.
The WP-inserted images are still gone, though. I’ll try a search and replace plugin, as you suggest. i think its weird, though, that the paths for WP-inserted images can’t be updated through the admin panel. As it is, the system still attempts to find them in
http://www.dolcevita.no/wp/wp-content/uploads etc. (year/month)
The same way, some links between pages are also broken. Hope this replace thing can fix that as well.
Its funny, though, that even if clicking a link opens a page like
http://www.dolcevita.no/wp/reisetips/verdt-a-vite/ – he page opens. As far as I understand, that url doesn’t exist. It just shows the page on the same URL without the wp part.
Kj
actually, if your images are the only problem then I think you’d save yourself some general kerfuffle by just moving the uploads folder (not the plugins, not the themes, just the uploads)…
if you put them into wp/wp-content/uploads, you can then change the path of your upload folder under Settings/Miscellaneous.
..
personally, I think it’s worth the effort to run a search and replace through your database and replace every instance of ‘/wp/’ with ‘/’ once that’s done once it never needs doing again.
you can do a similar thing in the 5 template files you’ve got with a text editor… it’s maybe 20 minutes work.
… but of course its up to you 😉
and remember to backup your DB before you run any wild SQL magic through it 😉
Just use the Search and Replace plugin and correct the URLs in the posts.
(see at the end of this post)
Thread Starter
Kjetil
(@kjetilgf)
Thanks to both of you.
Just to be 100 % sure, what I should do is this (?)
I – Backup and download the database
(II – Not move the uploads folder back into a wp directory)
III – Use the Search and replace plugin (or Massive replacer) to replace all
/wp/
with a
/
IV – Alter the template files (about 30 – many categories :o) – but I can’t see that its necessary.
As simple as that?
Thanks
PS Would moving the WP files back to a wp directory (as it was planned initially) still be an alternative – or just a trouble-maker?