• Resolved guye64

    (@guye64)


    Hi there,

    I have just moved into a multisite installation of WordPress, because I want to switch from WPML to Multilingual Press.

    I encountered a few problems during the move into mulstisite but I seemed to solve them and successfully finish the move of my main site.

    But when I go and create new sites within the network in order to move my subdomains (wiki.mariaaguye.com and escola.mariaaguye.com) into the network, they seem to be created but actually they are not. I can create them, but then I cannot access their backend, and I have checked the files on the server and the directory is empty.
    Exactly the same issue if I try to create a new site from scratch (en.mariaaguye.com for the English version of my main site), it allows me to create it but it’s empty.

    How can I solve it and really add more sites to my multisite installation?

    Thank you so much,

    Maria

    The page I need help with: [log in to see the link]

Viewing 15 replies - 1 through 15 (of 21 total)
  • Moderator bcworkz

    (@bcworkz)

    I have checked the files on the server and the directory is empty

    The empty directory is the directory/site name you chose for the subsite? That’s the problem then. You cannot have physical directories on your server matching the directory/site name. This is counter-intuitive and a common blunder with multisite.

    The way WP works is when a server cannot find a requested resource, it is assumed to be WP request and control is passed on to WP. If a resource physically exists, it is assumed to not be a WP request and the physical resource (an empty directory in this case) is served. WP never enters into the picture.

    The solution is to delete these empty directories that match subsite names.

    Thread Starter guye64

    (@guye64)

    Hi bcworkz,

    Thanks for your answer.

    I’m not sure if I understand how this works, but I have just deleted those empty directories that match subsite names and still I have the same problem: I cannot access those sites on my multisite installation.

    What else do I need to do?

    Thank you ,

    Maria

    Thread Starter guye64

    (@guye64)

    This is the message I get when trying to acces either the front or backend of any of my sites within the multisite installation:

    “Not Found

    The requested URL / was not found on this server.

    Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.”

    This happens with the new sites created. For the existing sites (currently subdomains of my main site) that I’m trying to move into the multisite, I created them in the multisite admin panel but when I try to access them from this panel, it takes me to a single site installation, so I cannot move their content into my multisitre network.

    What I’m doing wrong? How can I create actual new sites in my multisite network and move my existing ones into this multisite network?

    Thanks so much for your help,

    Maria

    Moderator bcworkz

    (@bcworkz)

    Believe it or not, a server 404 message is a good sign. It means requests can get through to WP once the redirects are properly setup. Which they clearly are not.

    The redirect rules in the .htaccess file are apparently not setup properly, or are missing. Log into your site and access the Network Admin area. Go to Settings > Network Setup. The proper rules for the .htaccess file are listed in #2

    In your .htaccess file, you may have default single site rules that no longer apply. They are demarcated with # BEGIN WordPress and # END WordPress comments. Remove everything between the comments and place the rules from Network Setup in their place. If there are no such comments, place the required rules below any other content in .htaccess.

    To edit this file, you will likely need to download it from your server via FTP or your hosting file manager. Make a backup copy, then edit the original. Upload the altered original back to the server. If you get a 500 error on your site now, there is an error in the file. Restore from the backup you made, then carefully check your work in the edited file.

    Thread Starter guye64

    (@guye64)

    Thank you for your answer.

    I did not have any # BEGIN WordPress and # END WordPress comments, so I placed the new rules below them and between a new <IfModule mod_rewrite.c> </IfModule>. Nothing changed.

    Then I tried replacing the old rules (between <IfModule mod_rewrite.c> </IfModule>) for the new ones, and nothing changed either:
    – I still get a 404 error when trying to access the new sites created in the network
    – I still access the existing subdomain sites (which were created before converting into multisite) as separate WP installations

    Then I remembered you told me that I should not have physical directories on my server for the new sites created in the network and so I removed them on the server, and then:
    – now I get a 500 error when trying to access the new sites created in the network
    – I still access the existing subdomain sites (which were created before converting into multisite) as separate WP installations

    Thoughts?

    Thank you,

    Maria

    Thread Starter guye64

    (@guye64)

    I am remembering that, when I moved to multisite, I had problems because I had originally created my website in a multisite installation. That was at the very beginning of creating my website. I then encountered some problem and I changed it to single site.

    When converting to multisite (this time) the system told me that I already had some configuration on my db for multisite and therefore I was not allowed to create it again. I had to ‘clean’ the db first.

    I searched for information and I found a document within the WP codex, and I deleted some tables on my database that seemed to be the ones causing conflict.

    Maybe I deleted something that I shouldn’t and that’s why I am now getting those errors?

    In the meanwhile, I switched to another hosting provider (which by the way, only allows me to have one database and I’m getting an alert on that).

    Is this helpful?

    Thank you,

    Maria

    Moderator bcworkz

    (@bcworkz)

    Thanks for the history, I’m not sure it points to a solution, but it helps in my understanding of the situation. I don’t think cleaning out the old multisite tables would have been caused the current issues. If it was done wrong, you probably couldn’t use the site at all.

    You access existing subdomain sites as separate WP installations. That is as expected and desired, correct? It shouldn’t impact the multisite installation in regards to new subdomain sites. How have you configured your site for subdomains? Is it set up for wildcard subdomains? Or are you adding new subdomains through your hosting account in concert with adding sites in WP? The third option is virtual hosts, which would typically not be available for the sort of accounts that only have one DB.

    Please check your error logs for any additional clues regarding the cause of 500 status.

    Thread Starter guye64

    (@guye64)

    Hi bcworkz,

    Thanks for your reply. It’s taken me quite long to respond you, my apologies.

    I am currently trying to move content of the existing subdomains (wiki. and escola.), from a separate installation (where I initially created them), to the multisite installation. I am following this tutorial to do it:
    https://codex.www.ads-software.com/Migrating_Multiple_Blogs_into_WordPress_3.0_Multisite

    If you see it, they ask you to create new blogs (I guess they mean sites?) in the multisite installation. Then you need to go to each blog’s backend and import a file you previously exported.
    But I cannot access the backend of these newly created sites (I cannot access them at all) so I cannot finish the process of moving those sites to the network.

    How have you configured your site for subdomains? Is it set up for wildcard subdomains? Or are you adding new subdomains through your hosting account in concert with adding sites in WP? The third option is virtual hosts, which would typically not be available for the sort of accounts that only have one DB.

    I’m afraid I don’t understand you.
    For the new sites created (and this is only one new site so far, which is the english version of the main site) I first created the subdomain on my hosting account, and then I created a new site in the multisite network, on WordPress. Did I do it correctly? Is this what you were asking? If I did it wrong, how could I do it right?

    And lastly, how can I check my error logs?

    Thank you so much for your help,

    Maria

    Moderator bcworkz

    (@bcworkz)

    Installing multisite is sooo confusing! Between multiple ways of doing something and ambiguous terms, it’s hard to keep everything straight.

    In multisite, when referring to sub-sites, we call them “blogs” behind the scenes in source code. The term often leaks out into normal discourse. For example, the PHP function that switches between sub-sites is called switch_to_blog(). But in the admin interface these so called blogs are indeed called “sites”. “Blog” is a throwback to the original purpose of WP before it became a major CMS platform. I prefer the term “sub-site” to differentiate from the overall installation “site”. Just my own quirk, it’s not any sort of official terminology.

    Adding a sub-domain though hosting is one viable way to add sub-sites. What is important is where you send sub-domain requests in the server file system. This is dependent on whether your multisite is installed as sub-domain based or as sub-directory based. Either one can work when you specify sub-domains in your hosting. The installation type is chosen when multisite is first setup. It’s not easy to switch once chosen. Once setup, its not all that obvious which was chosen.

    To verify which type you chose, access your network admin and go to Network Settings > Network Setup. In item #1 on that screen SUBDOMAIN_INSTALL can be defined as true or false and tells us which installation type you chose. This impacts where you send sub-domain requests when you add one in hosting.

    If your subdomain install definition is true, send requests to the main installation. WP will sort out what to do internally. If defined as false, send requests to a sub-directory of the same name as the sub-site. This does not have to be, but is generally the same as the sub-domain name. The named sub-directory must not physically exist on the server. If the adding sub-domain process in hosting creates such a directory, go back in via FTP or file manager and remove it.

    Regardless of how requests get to WP, you must of course also add a sub-site through the WP user interface. So what you did could be correct, the devil is in the details. Apparently some detail is incorrect, otherwise sub-sites should be working. I hope this all makes some sense to you. It is unavoidably confusing. If anything needs clarification, don’t hesitate to ask. Let me know what installation type you have setup so I can properly tailor further explanations.

    Oh, almost forgot. Finding error logs: It depends on your host. A couple common possibilities is within your server file system or an item in your hosting control panel. If in your file system, it’ll be at a level below public html. Look for a directory named similar to logs, error_logs, error.log, etc. There may be multiple files, view the contents of the most recent of those containing error messages (access and other logs are commonly stored in the same directory). If you cannot go below public html when accessing your file system, there is most likely an icon in your control panel. A few hosts provide access in unusual ways. If you cannot find access to error logs on your own, try using your host’s help system or ask them directly through customer support.

    Naturally, if you manage to get sub-sites working with the above clarifications, the error log content is of little interest to me ??

    Thread Starter guye64

    (@guye64)

    Thank you so much for your thorough explanations on terminology and sub-site types, it’s all clear now.

    My multisite is sub-domain based.

    I found (thanks!) and checked the error logs. I’ve got:
    – one file called “error_log”. I found two errors there:

    1. `[22-Jan-2019 18:57:24 UTC] WordPress database error Table ‘mariaguy_wpaguye.wpnz_2_icl_translations’ doesn’t exist for query SELECT element_id, language_code
    FROM wpnz_2_icl_translations
    WHERE trid =
    (SELECT trid
    FROM wpnz_2_icl_translations
    WHERE element_type = ‘post_page’
    AND element_id = (SELECT option_value
    FROM wpnz_2_options
    WHERE option_name=’page_on_front’
    LIMIT 1))
    made by require(‘wp-blog-header.php’), require_once(‘wp-includes/template-loader.php’), include(‘/themes/themify-ultra/page.php’), get_header, locate_template, load_template, require_once(‘/themes/themify-ultra/header.php’), themify_menu_nav, wp_nav_menu, apply_filters(‘wp_nav_menu_objects’), WP_Hook->apply_filters, Inpsyde\MultilingualPress\NavMenu\ItemFilter->filterItems, Inpsyde\MultilingualPress\NavMenu\ItemFilter->filterItemsCache, Inpsyde\MultilingualPress\Framework\Cache\Server\Facade->claim, Inpsyde\MultilingualPress\Framework\Cache\Server\Server->claim, Inpsyde\MultilingualPress\Framework\Cache\Server\Server->fetchUpdatedValue, Inpsyde\MultilingualPress\NavMenu\ServiceProvider->Inpsyde\MultilingualPress\NavMenu\{closure}, Inpsyde\MultilingualPress\NavMenu\ItemFilter->filterItems, Inpsyde\MultilingualPress\Api\Translations->searchTranslations, Inpsyde\MultilingualPress\Framework\Cache\Server\Facade->claim, Inpsyde\MultilingualPress\Framework\Cache\Server\Server->claim, Inpsyde\MultilingualPress\Framework\Cache\Server\Server->fetchUpdatedValue, Inpsyde\MultilingualPress\Api\ServiceProvider->Inpsyde\MultilingualPress\Api\{closure}, Inpsyde\MultilingualPress\Api\Translations->searchTranslations, Inpsyde\MultilingualPress\Api\Translations->buildTranslations, Inpsyde\MultilingualPress\Api\Translations->buildTranslationsForSiteIds, Inpsyde\MultilingualPress\Api\Translations->buildTranslationDataForSiteId, Inpsyde\MultilingualPress\Api\Translations->translationForRelatedContent, Inpsyde\MultilingualPress\Translator\PostTranslator->translationFor, Inpsyde\MultilingualPress\Translator\PostTranslator->translationData, Inpsyde\MultilingualPress\Translator\PostTranslator->publicUrl, get_permalink, get_page_link, get_option, apply_filters(‘pre_option_page_on_front’), WP_Hook->apply_filters, SitePress->pre_option_page_on_front, WPML_Pre_Option_Page->get`

    2. And:
    [22-Jan-2019 18:58:19 UTC] PHP Warning: ini_set() has been disabled for security reasons in /home2/mariaguy/public_html/wp-content/plugins/debug-objects/debug-objects.php on line 96

    – I also have another file called php_errorlog, this one contains this error:

    [28-Dec-2018 12:18:55 UTC] WordPress database error Table 'mariaguy_wpaguye.wpnz_2_icl_translations' doesn't exist for query 	SELECT element_id, language_code
    						FROM wpnz_2_icl_translations
    						WHERE trid =
    							(SELECT trid
    							 FROM wpnz_2_icl_translations
    							 WHERE element_type = 'post_page'
    							 AND element_id = (SELECT option_value
    											   FROM wpnz_2_options
    											   WHERE option_name='page_on_front'
    											   LIMIT 1))
    						 made by require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), include('/themes/themify-ultra/page.php'), get_header, locate_template, load_template, require_once('/themes/themify-ultra/header.php'), themify_menu_nav, wp_nav_menu, apply_filters('wp_nav_menu_objects'), WP_Hook->apply_filters, Inpsyde\MultilingualPress\NavMenu\ItemFilter->filterItems, Inpsyde\MultilingualPress\NavMenu\ItemFilter->filterItemsCache, Inpsyde\MultilingualPress\Framework\Cache\Server\Facade->claim, Inpsyde\MultilingualPress\Framework\Cache\Server\Server->claim, Inpsyde\MultilingualPress\Framework\Cache\Server\Server->fetchUpdatedValue, Inpsyde\MultilingualPress\NavMenu\ServiceProvider->Inpsyde\MultilingualPress\NavMenu\{closure}, Inpsyde\MultilingualPress\NavMenu\ItemFilter->filterItems, Inpsyde\MultilingualPress\Api\Translations->searchTranslations, Inpsyde\MultilingualPress\Framework\Cache\Server\Facade->claim, Inpsyde\MultilingualPress\Framework\Cache\Server\Server->claim, Inpsyde\MultilingualPress\Framework\Cache\Server\Server->fetchUpdatedValue, Inpsyde\MultilingualPress\Api\ServiceProvider->Inpsyde\MultilingualPress\Api\{closure}, Inpsyde\MultilingualPress\Api\Translations->searchTranslations, Inpsyde\MultilingualPress\Api\Translations->buildTranslations, Inpsyde\MultilingualPress\Api\Translations->buildTranslationsForSiteIds, Inpsyde\MultilingualPress\Api\Translations->buildTranslationDataForSiteId, Inpsyde\MultilingualPress\Api\Translations->translationForRelatedContent, Inpsyde\MultilingualPress\Translator\PostTranslator->translationFor, Inpsyde\MultilingualPress\Translator\PostTranslator->translationData, Inpsyde\MultilingualPress\Translator\PostTranslator->publicUrl, get_permalink, get_page_link, get_option, apply_filters('pre_option_page_on_front'), WP_Hook->apply_filters, SitePress->pre_option_page_on_front, WPML_Pre_Option_Page->get

    Is this of any help to you?

    I tried deactivating all plugins, with no success.
    Then I tried deleting all sub-sites via WP-admin and creating them again (created only the en. sub-site), but nothing changed either.

    I checked my server’s file system and an “en” folder was created, but it was empty. Is this ok?

    What else could I check/do?

    Thank you so much,

    Maria

    Moderator bcworkz

    (@bcworkz)

    Thanks for the log entries. None of those would prevent your site from working with plugins disabled. The missing table for your translation plugin will need to be addressed before you can expect the plugin to work correctly. No need to deal with that right now.

    You’ve gotten both 404 and 500 errors in the past. What are you getting now when you try to access a new sub-site? And if 404, what does the screen look like? Is it the boring server level screen like the 500 screen, or a themed WP screen that says something like “Nothing Found”?

    Perhaps you should post the content of your .htaccess file for review. If it’s fairly long, post it at pastebin.com and just provide a link here to your “paste”. Be sure you’ve obfuscated any personal information that may be in the content. There generally isn’t any, but one never knows for sure without checking.

    I’ll be travelling for several days, so my responses may be more erratic for a while. I’m not abandoning you ??

    Thread Starter guye64

    (@guye64)

    Thank you again for your answer.

    The error page I’m now getting when trying to access the en. sub-site looks like a standard WP screen to me, with very simple styling. You can (probably?) see it here: https://en.mariaaguye.com/wp-admin/

    This is what it says:
    Not Found

    The requested URL /index.php was not found on this server.

    Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.”

    This is the content of my .htaccess file (it isn’t that long and it doesn’t contain any private information so I’ll just paste it here):

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    
    # add a trailing slash to /wp-admin
    RewriteRule ^wp-admin$ wp-admin/ [R=301,L]
    
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ - [L]
    RewriteRule ^(wp-(content|admin|includes).*) $1 [L]
    RewriteRule ^(.*\.php)$ $1 [L]
    RewriteRule . index.php [L]
    </IfModule>
    # END WordPress
    
    # BEGIN WordPress WPO Tweaks by Fernando Tellado
    <IfModule mod_expires.c>
    # Activar caducidad de contenido
    ExpiresActive On
    # Directiva de caducidad por defecto
    ExpiresDefault "access plus 1 month"
    # Para el favicon
    ExpiresByType image/x-icon "access plus 1 year"
    # Imagenes
    ExpiresByType image/gif "access plus 1 month"
    ExpiresByType image/png "access plus 1 month"
    ExpiresByType image/jpg "access plus 1 month"
    ExpiresByType image/jpeg "access plus 1 month"
    # CSS
    ExpiresByType text/css "access 1 month"
    # Javascript
    ExpiresByType application/javascript "access plus 1 year"
    </IfModule>
    <IfModule mod_deflate.c>
    # Activar compresi贸n de contenidos est谩ticos
    AddOutputFilterByType DEFLATE text/plain text/html
    AddOutputFilterByType DEFLATE text/xml application/xml application/xhtml+xml application/xml-dtd
    AddOutputFilterByType DEFLATE application/rdf+xml application/rss+xml application/atom+xml image/svg+xml
    AddOutputFilterByType DEFLATE text/css text/javascript application/javascript application/x-javascript
    AddOutputFilterByType DEFLATE font/otf font/opentype application/font-otf application/x-font-otf
    AddOutputFilterByType DEFLATE font/ttf font/truetype application/font-ttf application/x-font-ttf
    </IfModule>
    # END WordPress WPO Tweaks by Fernando Tellado
    
    

    Thank you for bearing with me,

    Maria

    Moderator bcworkz

    (@bcworkz)

    Thanks for posting your .htaccess, it all appears correct. The fact you get a WP themed Not Found tells us sub-domain requests are at least getting through to WP code. Until now, I wasn’t even sure of that much. This means the setup in hosting, .htaccess, and wp-config.php are all correct. What’s happening now is for some reason WP cannot match up the sub-domain with the related site.

    Is the site you added simply named “en”? It should be. Sadly, I’m unsure right now what the next step is to debug this is. I’m currently unable to access my own sub-domain multisite installation to investigate possible next steps. It’ll likely be a code snippet to temporarily add to your theme’s functions.php that outputs debug data to the error log.

    If you can bear with me until next week, I’ll come up with something to try. In the mean time, here’s a homework assignment: ??
    Figure out how to gain access to your DB through phpMyAdmin. I may need you to verify some data there. There is usually access through your hosting panel, but some hosts have alternative ways. You’ll need either your hosting account user/password or the ones in wp-config.php to gain access. Also note the DB name in wp-config.php, it could be useful in finding the right entry in phpMyAdmin. Once you’re in, you can explore if you’re curious, just do not change anything. It’s all too easy to corrupt the DB by making the wrong change.

    Moderator bcworkz

    (@bcworkz)

    I’ve regained access to my sub-domain installation as a point of comparison. Without it I could not even think straight. Thank you for your patience.

    There still remains server issues on your end that are not properly resolved. I’m afraid my optimism at a themed Not Found page was due to wishful thinking. Something is not right with the domain alias setup for the “en” sub-domain. The link you gave me, https://en.mariaaguye.com/wp-admin/, is not accessible to me, nor should it be. However, https://en.mariaaguye.com/ should return something, normally either the sub-site or a sign up form for a new blog site or the reasons why I could not make a new blog site if one did not exist. Instead, I get a 403 forbidden error.

    Furthermore, https://en.mariaaguye.com/license.txt should return the license file found at https://mariaaguye.com/license.txt if the “en” sub-domain alias was redirecting properly. Instead I get the same Not Found error page that you saw. (FYI, that is not a plain WP theme, it’s a server level page external to WP)

    Please double check how you have setup your “en” sub-domain. It must lead to the site’s main installation folder. The usual default destination is a sub-folder of the same name, which for sub-domain WP would be incorrect. Unfortunately, every host manages sub-domains differently. You might see if there is an alternative to an “alias”. For example, my host has no “alias” provision. Instead, sub-domains are added directly to the main domain.

    Other possibilities are virtual hosts and DNS CNAME records. Not all of these may be available to you even though they are technically possible. If you still have trouble, please utilize your host’s technical support for assistance. Once the sub-domain is redirecting correctly, and if you still encounter problems with WP itself, I’ll be happy to help you further.

    • This reply was modified 6 years, 1 month ago by bcworkz.

    Hello maybe this will help you.

    He had the same problem and this solved it.

    We have discovered that the wildcard subdomain for the domain had an incorrect root directory assigned.

    Go to your cPanel to the subdomains area and check the following

    My mistake:
    Subdomains Document Root
    *.mywebsite.com /_wildcard_.mywebsite.com

    It worked for me:
    Subdomains Document Root
    *.mywebsite.com /mywebsite.com

    Another important thing is that I left the .htacess that is indicated for directories and not the one indicated for subdomains.

    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]

    This worked for me, for multisite subdomains. I do not know why per well it was. Try both.

    Good luck ??

Viewing 15 replies - 1 through 15 (of 21 total)
  • The topic ‘News sites not being created in multisite’ is closed to new replies.