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

Request ID #1396 Resolved
  • 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

    Hello 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.

    Hi,

    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

    Hi 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.

    Hi 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

    Hi 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.

    Ahh 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

    Sure, would you please send me your WordPress admin details to support@nicethemes.com?

    Thanks
    Juan.

    Hi Juanfra,

    Did you get my e-mail with my details?

    Kind regards,

    Daniel.

    Juanfra Aldasoro

    Hi Daniel,

    No, I didn’t would you please send them again?

    Thanks,
    Juan.

    Hi 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

    Hi 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.

    Hi 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/$1

    and 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.

    Juanfra Aldasoro

    I’m happy to hear that 🙂

    Thank you.
    Juanfra.

Viewing 14 posts - 1 through 14 (of 14 total)

This topic is marked as resolved

Only the topic author can re-open this thread.

Login to your Account

Welcome back! Please log in to your account by filling the fields below:

Forgot?

Not a member? Create a free account.

Create a Free Account

You're 27 seconds away from some awesome WordPress free stuff, benefits and more. Create a free account and have access to our free products, benefits and more!

Already have an account? Log in
Secure Server