Food menus/ food item links don't work after WP move from directory to root(live
This support request was posted in BBQ by daniel
- daniel April 24, 2013 at 10:19 am
Hi,
I have just moved my site from a subdirectory(/wp/) into the root of my shared hosting space(basically gone live). And everything seems to have gone smootly. Links to all pages are working except for my the sub menu ‘food menu’ items on my main navigation, as well as the actual food item pages that would click on while viewing the whole menu. Here is a link to the site in question: http://pierosrestaurant.co.uk/
I’m not sure if has something to do with the /index.php/ being in the URL which I’m also trying to get rid of, could anyone advise on whether this is a cause and how to get rid of it?
When making the move from directory to root I believe I actioned it correctly and used an Update URL plugin to update all the URLs in the database.
I also followed the same process when moving my other site(http://amicobar.co.uk/) using the same theme and the drinks menu items are working fine. but I’m not sure what went wrong with Pieros.
Could someone please help?
Juanfra Aldasoro April 24, 2013 at 1:16 pmHello there,
Thanks for writing. I would recommend you to avoid having the /index.php/ in the URL.
Did you try by rewriting the permalinks? (Check the page “Settings > Permalinks” in the Admin section.)
Best,
Juan.daniel April 24, 2013 at 1:48 pmHi,
I have tried removing /index.php/ but then no pages other than the home page work. As you can see on http://amicobar.co.uk/, /index.php/ is still present. So I can only assume that this isn’t the cause. So that kind of Null’s my point in my first post about the /index.php/ being the problem??
Juanfra Aldasoro April 24, 2013 at 2:00 pmHi Daniel,
Thanks for your quick response. I’m not saying that /index.php/ in the URL is the problem. I’m just giving a recommendation of avoiding that.
With regards to the menu links – have you tried regenerating your permalinks? Often, when moving sites, WordPress need to rewrite permalinks for them to work.
Best,
Juan.daniel April 24, 2013 at 2:19 pmHi Juanfra,
Not a problem, thank you for your quick reply.
OK I see, Would you be able to advise how I can regenerate the permalinks?
Juanfra Aldasoro April 24, 2013 at 2:25 pmHi Daniel,
No problem.
Yes, Check the page “Settings > Permalinks” in the Admin section. You need to save changes.
Please, check that you will get a message when saving the permalinks. You may need to change permissions for the .htaccess file (that’s the file where WordPress set the permalinks rules).Best,
Juan.daniel April 24, 2013 at 2:49 pmAhh thank you very much, this has solved the issue! I never though just saving the page would regenerate the permalinks. Would you be able to advise on how to remove the /index.php/ from the URL?
Simply removing /index.php/ from the “Custom Structure” doesn’t solve the problem as I get a “Page not found”?
Juanfra Aldasoro April 24, 2013 at 2:53 pmSure, would you please send me your WordPress admin details to support@nicethemes.com?
Thanks
Juan.daniel April 25, 2013 at 2:57 pmHi Juanfra,
Did you get my e-mail with my details?
Kind regards,
Daniel.
Juanfra Aldasoro April 25, 2013 at 3:00 pmHi Daniel,
No, I didn’t would you please send them again?
Thanks,
Juan.daniel April 25, 2013 at 3:18 pmHi Juanfra,
Just sent them, please let me know if they are OK? And also what you do to solve it as I’m goign to have to do the same thing with Amicobar as well.
Thank you.
Daniel.
Juanfra Aldasoro April 26, 2013 at 1:21 pmHi Daniel,
We got the details, thanks. We’ve sent you a reply regarding this issue. Did you get any luck with the hosting company?
Best,
Juan.daniel April 26, 2013 at 3:18 pmHi Juanfra,
A friend actually supplied with with this re-write script that I put in the root folder and it solved the problem. The code was as follows:
#Zeus webserver version of basic WordPress mod_rewrite rules
map path into SCRATCH:path from %{URL}
look for file at %{SCRATCH:path}
if exists then goto END
look for dir at %{SCRATCH:path}
if exists then goto END
##### FIX FOR LOGIN/FORGOTTEN PASSWORD/ADMIN ETC #####
match URL into $ with ^/wp-.*$
if matched then goto END
##### FIX TO ALLOW SEARCH TO WORK #####
match URL into $ with ^/(.*)
set URL = /index.php/$1and the file name was “rewrite.script” this seems to have worked as treat and solved my problem. I will note that I also changed the site name in general settings from pierosrestaurant.co.uk -> http://www.pierosrestaurant.co.uk. Not sure if this actually helped though.
Thank you for all your help Juanfra.
This topic is marked as resolved
Only the topic author can re-open this thread.