Loss of Blog page after installing Sub-Directories

I installed sub-directories onto my website, and was warned that by doing so I might lose permalinks to things. There seemed no alternative, so I went ahead... but indeed I lost permalinks! Most I think I can redo and recover, but I'm having problems with the main blog page. With the theme I have it lists a summary of the latest blogs but now comes up as page not found. It's not the front page by the way but the posts page... I've named it - http://50.87.248.176/~beyonfa9/blog/
Your welcome to access the dashboard but at the moment I dont seem to be able to get the WPMUDEV dashboard.
Can someone help?

  • Nastia

    Hello @timmichaelharris

    I understand that you moved your WordPress installation from subdomain to subfolder, right?

    After forcing sundirectories to WordPress you should edit .htaccess file. In case did not, please replace this:

    # BEGIN WordPress
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index.php$ - [L]
    
    # uploaded files
    RewriteRule ^files/(.+) wp-includes/ms-files.php?file=$1 [L]
    
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ - [L]
    RewriteRule . index.php [L]
    
    # END WordPress

    With this:

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    
    # uploaded files
    RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-includes/ms-files.php?file=$2 [L]
    
    # add a trailing slash to /wp-admin
    RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]
    
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ - [L]
    RewriteRule  ^[_0-9a-zA-Z-]+/(wp-(content|admin|includes).*) $1 [L]
    RewriteRule  ^[_0-9a-zA-Z-]+/(.*\.php)$ $1 [L]
    RewriteRule . index.php [L]
    </IfModule>
    # END WordPress

    If the above solution will not solve the issue you have, please check your database tables wp_sites and wp_sitemeta. Search for site1.domain.com and replace it with domain.com and so on.

    I hope this helps!

    Cheers,
    Nastia

  • Nastia

    Hello @timmichaelharris

    Just want to clarify something if we are on the same page here, you created a multisite with subdirectories from a single installation, correct? What steps have you followed?

    Have you followed all the steps from this manual?
    http://codex.wordpress.org/Create_A_Network

    Where are wp_sites and wp_sitemeta?

    Since you have no subsites yet, these tables aren't created yet by WordPress.

    Can you access the administration dashboard? If you can, navigate to Settings > General, check the website's URL and re-save the changes.

    You seeing the "Your page isn't redirect properly" when you trying to view the front page?

    Please advise,

    Cheers,
    Nastia

  • Tim

    Yes I followed the steps from the manual you've made reference to. I wasn't clear about the instruction:
    If you plan to run WordPress out of its own directory, do that before activating Multisite
    So I left this assuming it was already done or I wouldn't run WordPress out of its own directory. Agreed there are no sub-sites yet.
    Not clear when you say :
    Can you access the administration dashboard? If you can, navigate to Settings, check the website's URL > General
    When you say administration dashboard do you mean Network Admin > Settings, because it doesn't have the website's URL there. The URL of the page is http://50.87.248.176/~beyonfa9/wp-admin/network/settings.php.
    Or do you mean by administration dashboard, the one for the primary site, as again it doesn't have the website's URL there. The URL of this page is http://50.87.248.176/~beyonfa9/wp-admin/options-general.php.

    FYI when I try to access the front page (which is not the landing page however), the URL is:
    http://50.87.248.176/~beyonfa9/~beyonfa9/~beyonfa9/~beyonfa9/~beyonfa9/~beyonfa9/~beyonfa9/~beyonfa9/~beyonfa9/~beyonfa9/~beyonfa9/~beyonfa9/~beyonfa9/~beyonfa9/~beyonfa9/~beyonfa9/~beyonfa9/~beyonfa9/~beyonfa9/~beyonfa9/magazine-2/.

    BTW I've called the front page, or blog page, Magazine.

  • Panos

    Hey there Tim,

    What Nastia meant was to log in your main blog's admin and check if the website's URL there is correct, and if not correct it :slight_smile:

    I am not sure how you switched from subdomain to subfolder. Could you please edit file wp-config.php and set
    define('SUBDOMAIN_INSTALL', false);
    Probably it is currently set to true. Change it to false as above.

    If still you are having issues try replacing your .htaccess with the following:

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    
    # add a trailing slash to /wp-admin
    RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]
    
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ - [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
    RewriteRule . index.php [L]
    </IfModule>
    
    # END WordPress
    
    RewriteEngine on

    I would recommend to keep a backup of your previous .htaccess.

    In case it still doesn't work we would need you to provide us ftp and login details to have a closer look on this.

    You can send that privately through our contact form: https://premium.wpmudev.org/contact/

    Select “?I have a different question?" for your topic - this and the subject line ensure that it gets assigned to me.

    Send in:Subject: "Attn: Panos Lyrakis”
    - WordPress admin username
    - WordPress admin password
    - login url
    - FTP credentials (host/username/password)
    - link back to this thread for reference: https://premium.wpmudev.org/forums/topic/loss-of-blog-page-after-installing-sub-directories
    - any other relevant urls

    Looking forward to hearing from you!

    Kind regards,
    Panos

  • Panos

    Hello Tim,

    Thank you for sending me the login and ftp credentilas! Unfortunately I couldn't connect to ftp, so username or password may not be correct.

    Could you ask you hosting provider to send you ftp credentials and then following same tactic as before to resend me so I can have a look at your .htaccess?

    Regarding:

    I wanted to install subdomains but I could only install subdirectories - not sure why?

    I might have misunderstood as I thought you meant the other way around in your original question :slight_smile:
    Thanks for clearing this! Did it work normally with sub-directories in the past?

    Looking forward to your reply!

    Kind regards,
    Panos

  • Tim

    Hi Panos... I was held-up on other stuff. I think the FTP login is as follows:
    Host beyondtheduero.com
    Username ***
    Password ***

    If this doesn't work I'll have a rethink.

    By the way I noticed you'd set up a test site... my original site isn't due to publish till 2018, yet it seems posts are being published and liked! Indeed the site isn't public yet, so I'm wondering how this is happening - is it the test site doing this?

    atb
    Tim

    [Edited - deleted credentials]

  • Nastia

    Hello Tim

    I trust you are well!

    Please do not post sensitive data in public forums. I have edited your post and deleted credentials.

    It seems my site is public... I don't want to publish it yet! Can this be reset to Coming Soon please.

    I have visited your site and the Coming Soon page has opened for me.

    Is this regarding a subsite you have?

    We couldn't connect to your site via FTP with the credentials that you have posted above.

    Do you have access to error logs on your server? It can give us an idea why you have this error:

    The page isn't redirecting properly

    Would you please access the phpMyAdmin and check the site url and home url in the wp_options table of the database. The video bellow is showing how to do this:
    https://www.youtube.com/watch?v=p10KZznGzEM

    Also, please check again the wp-config. php file, if your installation root and your site URL are correct.

    Another solution that I see has solved this error is to comment the following lines in the wp-config.php file:

    /*define('DOMAIN_CURRENT_SITE', 'localhost');
    define('PATH_CURRENT_SITE', '/Wordpress/');*/

    If this will not solve the issue, please post here your .htacces file so we can have a closer look.

    I hope this helps!

    Cheers,
    Nastia.

  • Tim

    OK
    It seems the wordpress.com is publishing posts not wordpress.org... no problem there!
    I'll try what you suggest but I would much appreciate if you can try and connect to my FTP manager. I've contacted my hosting provider and I now have the correct login details.
    How do I send them securely to you, the same as to Panos, see below but marking for your attention, which is simply Nastia?

    You can send that privately through our contact form: https://premium.wpmudev.org/contact/
    Select “?I have a different question?" for your topic - this and the subject line ensure that it gets assigned to me.
    Send in:Subject: "Attn: Panos Lyrakis”

  • Nastia

    Hello Tim

    I hope you are doing well today!

    To send credentials, please use our contact form:
    https://premium.wpmudev.org/contact/

    Select "I have a different question" for your topic

    And include the following inside the message:

    Subject: "Attn: Nastia”
    - WordPress admin username
    - WordPress admin password
    - login url
    - FTP credentials (host/username/password)
    - link back to this thread for reference: https://premium.wpmudev.org/forums/topic/loss-of-blog-page-after-installing-sub-directories
    - any other relevant urls

    *If you keep support access open, there is no need to send to us WordPress credentials.

    We are waiting for your email :slight_smile:

    Cheers,
    Nastia

  • Tim

    Hi Nastia

    I've replied securely with login details through I have a different question but also, in addition, are what I have found in response to your previous advice.

    I had a look at the video you recommended, but my phpMyAdmin doesn't look like what is in the video. It appears to lack many documents... I think this may be the problem overall with my site not directing properly, what do you think?

    I was trying to track errors through the general logs on the server, as you suggested, but it's like trying to find a needle in a haystack!

    Also you said:
    Also, please check again the wp-config. php file, if your installation root and your site URL are correct
    I believe they are but I'm not too sure.

    I'm going to leave your advice as follows at least till you have seen the phpMyAdmin, as I think that may be where the problem lies:
    Another solution that I see has solved this error is to comment the following lines in the wp-config.php file:
    /*define('DOMAIN_CURRENT_SITE', 'localhost');
    define('PATH_CURRENT_SITE', '/Wordpress/');*/

    atb
    Tim

  • Nastia

    Hello Tim

    My apologies for late reply!

    II'm afraid without access to the cPanel, I can not have access to the phpMyAdmin to have a look. I also could not access to your site with the FTP credentials you have sent.

    Would you please verify that you don not have "blog" folder inside your WordPress directory that may cause the redirect like this.

    If the above will not help, please try to deactivate all the plugins, switch to a default WordPress theme and check again. If the issue is gone, please activate one plugin at the time to find out which one is causing this conflict.

    Please follow the flowchart from our manual:
    http://premium.wpmudev.org/manuals/using-wpmu-dev/getting-support/

    Please try to re-sent to us your credentials. - Mark to my attention, the subject line should contain only: ATTN: Nastia
    - WordPress admin username
    - WordPress admin password
    - Login url
    - cPanel credentials
    - FTP credentials (host/username/password)
    - Link back to this thread for reference
    - Any other relevant urls

    Select “I have a different question” for your topic - this and the subject line ensure that it gets assigned to me
    http://premium.wpmudev.org/contact/

    Kind Regards,
    Nastia

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.