Broken root site admin
I was changing the root domain for a multisite installation (and also getting rid of /blog slug from the root URLs with WP No Category Base – WPML compatible plugin) and the root site admin is broken.
For example, when I go to one of the posts, click -> Edit and press -> Update (without making any changes, but that doesnt matter), it would save all the changes, but it doesnt load anything in the window. So I need to enter http://domain-name.com/wp-admin by hand, to get it show on the screen again etc (I keep repeating this step a lot of times in order to be able to update the blog)
The URLS are (for example):
and it goes to:
http://domain-name.com/wp-admin/post.php (and there is nothing in the browser window)
I get the same situation with other options, like:
Categories -> Edit -> Update
Settings -> General -> Save
etc… It always saves and appllies whatever changes I make, but it does not load anything in the window.
EDIT: I also changed an upload path to images, as they were not showing on the website, according to the following:
1.Go to Super Admin > Sites, hover over the primary blog and click Edit
2.Change “Upload Path” to wp-content/blogs.dir/1/files (this one was: wp-content/uploads)
3.Change “Upload Url Path” to /files (this one was empty)
4.Change “Fileupload Url” to http://domain.com/files (this one was: http://domain-name.com/wp-content/uploads)
I think it is one of the three things that is causing the problem…
*sigh* Don’t do that. Really, don’t screw around with the uploads, they have nothing to do with your admin working (or not working), they have to do with your media, where it’s stored, and what URL it’s access by. It’s supposed to be wp-content/uploads for your main site.
Don’t assume you know better than WordPress’s default install, unless you’re a core developer. And even then, you’re probably wrong 🙂 I’ve had to rebuild enough sites to know that I don’t know better, and I’ve been at this for a long time now.
The issues are all down to two likely things:
Since none of these things happen on clean installs, you’ve basically managed to muck up your site. The best thing you can do is start the normal, standard debugging.
Turn off all of your plugins. Yes. All. And switch to the TwentyEleven theme.
Does the issue with saving posts still happen?
I changed the upload settings because of images not showing on the root site, and that helped. I was also told to check whether AllowOverride is set to All in httpd.conf file (the answer from host was yes), but I just left it at this, since it was working. But it looks like I took a wrong path…
I have several things going on with the root site that I need / want to fix:
1) Pagination not working (I get a 404 error on http://domain-name.com/page/2
2) Root site admin is broken (it saves the information, but it does not go back to the screen, like I mentioned before)
3) Yoast SEO sitemap is not working (I actually get the same “nothing” screen from point 2, when I enter http://domain-name.com/sitemap_index.xml <thats the URL for the sitemap on the other, not root, blogs>; when I enter something like http://domain-name.com/some-word/sitemap_index.xml I get a 404 error – so it looks like something is there, but it is not showing)
I will be deactivating all the plugins, and testing it on TwentyEleven, according to the post above.
I am gonna try to do this one thing at a time, so to come back to the “square one” – images are not showing on the root website after adding them to a post.
I changed the settings to the origninals, which is:
Upload Path: wp-content/uploads
Upload Url Path: <empty>
File Upload Url: http://domain-name.com/wp-content/uploads
#) AllowOverride is set to All in httpd.conf
#) When I right-click “Properites” on the empty image spot I get the following URL:
#) This is htaccess file:
#) Broken root site admin issue dissapears after changing to TwentyEleven, but at the same time I dont have no issues on any of the other (non root sites) that are using exactly the same theme (I use the same theme, but name it differently, so I am able to edit them separately without a need of using a plugin <I just modify a name on the top of main ccs file>, but the point is that it is not all going from one theme folder, but each site has a separate one)
#) Sitemap is showin also, after switching to TwentyEleven (again, all other sites use that theme, and there is no issue)
The other thing is that I think that this theme was working correctly to begin with, and all the issues started after making some Settings changes etc…
#) I changed the image link to wp-content/uploads and it is still not showing… (I cant edit the previous post)
#) After entering the image URL into browser address bar I get the following:
Access to this resource on the server is denied!
On other sites when I copy the link and go to the URL I get an image in the browser, so it might be some permissions issue somewhere…
(wp-content/uploads and wp-content/blogs.dir are both set to 751; all the permissions are exactly the same 751 for folders, and 640 for the actual image files in both cases)
For a non-root site it is for example:
(and this one would show)
# # #
The only thing that I did to the site was changing the root domain name with:
Then I was experimenting with the following settings, and I think I changed them all back to defaults (I listed the contents of the fields also):
Permalink Structure: %postname%
Category Base: <empty>
Upload Path: wp-content/uploads
Upload Url Path: <empty>
Fileupload Url: http://domain-name.com/wp-content/uploads
Other than that the site should be in the original state…
Wow. Your .htaccess is seriously screwed up.
Since we’re supposed to be testing without any plugins, revwert your .htaccess to one of these: http://codex.wordpress.org/Multisite_Network_Administration#.htaccess_and_Mod_Rewrite
Also keep in mind: WordPress’ rewrite rules always go on the bottom. So you should have a layout like this:
#Begin W3TC All that stuff # End W3TC # Begin WordPress All WP's stuff # End WordPress
I changed the .htaccess file to SubFolder example (my installation is subfolder), and I am in the same spot:
1) Images don’t show on the website
2) Admin is broken (it goes to these “nothing” pages; it doesnt apply to all the admin links – some of them work, some of them dont)
3) Sitemap is not shoiwng (it goes to that “nothing” page also)
I am not sure what is causing the images issue (although I mentioned something about permissions, like WordPress would be putting them there, but couldnt read them), and points 2 and 3 seem to be theme related (issues disappear after switching to TwentyEleven). The thing is that I need to keep the theme that I am using, as all the websites that I am working on look the same (again, I think that everything was working fine to begin with)
This is the theme that I am using:
I made some modifications, but mostly CSS, and I did not change anything that would cause the site not to work correctly (I was only making changes in Network Admin -> Sites -> (root site) Edit -> Settings, and I think that right now everything is set to defaults)
It’s likely your theme.
Last Updated: 2009-04-03
That’s three years, and there have been a lot of changes in WP (including Multisite).
I changed the theme for a new one and it solved all the issues except for the broken images.
When I start a new post and click Upload/Insert -> Select Files , I am not showing the image preview (above <Edit Image> button), but I am able to view it after clicking “Edit Image”. When I insert it into post and publish it the image is not showing on the website.
For the image URL I get the following path:
…and I am not able to access it directly through this URL in the browser. I get the following error:
403 Forbidden, Access to this resource on the server is denied!
When I go to a different site on the installation (non root), I am easily able to access the image through a URL that is given, for example:
(I would be talking about Media -> Library -> (Edit) -> File URL)
I think that all the settings are set to default also (Network Admin -> Sites -> (root site) Edit -> Settings).
Double check that the /wp-content/uploads/2012/06/ stuff actually exists.
I suspect that it’s all the monkeying around with the uploads that got that one borked :/
Files are uploaded in the folder. I started changing the settings because the images were not uploading, so it was not working in the first place. I have a feeling I might neet to tall to my hosting about this one…
FWIW, the wp-content/uploads folders don’t go through the ms-files redirect. That is, your images in http://domain2-name.com/files/2012/06/file2-name.jpg are going from that to the ms-files.php page (see the line in the .htaccess? That’s it 🙂 ) and then to http://domain2-name.com/wp-content/blogs.dir/#/files/2012/06/file2-name.jpg
A link to http://domain-name.com/wp-content/uploads/2012/06/image-name.jpg is a totally direct link, no extra hoops and ladders.
You don’t have any hotlink protection going on, do you?
I checked and Hotlink Protection is Disabled (thats in cPanel if somebody else is looking)
- The topic ‘Broken root site admin’ is closed to new replies.