Posts Tagged ‘wordpress’

WordPress Mu 2.7.1 and Multi-Site Manager

Friday, April 24th, 2009

I have neglected this blog due to routine work lately. I have done some things, but not much to write home about, and being swamped with work, I just lacked the initiative to add new stuff, or to dwell into new technologies and problems. Routine is routine, and upgrade to WordPress Mu sometimes introduces new issues.

A very useful plugin called “Multi-Site Manager” is available for, well, managing easily multi-site configuration of a single WPMU from the GUI.

I have been using it for a while, and I was happy with it, however, after the latest Mu upgrade (2.7.1), a single problem appeared – you cannot manage sites from a newly created domain. Already existing domains functionality was not changed, but only new ones.

I through myself knee deep into its MySQL data, and got to the following workaround. This should be incorporated into the code, but me being such a lame PHP coder, maybe it’s not the best idea that I do it…

Problem:

You have created a new site, but from within its admin you cannot view the site admin panel. Manually entering the URL results in a “Permission Denied” error message.

Solution:

Login to your MySQL DB.

Use the MU database.

Find your new site ID:

select * from wp_site;

Write down the site number. Also, write down another site number – a small site would be best.

Get the correct entry for site_admins from some other blog

Select * from wp_sitemeta where meta_key=’site_admins’;

Response should look something like this:

+———+———+————-+——————————————+
| meta_id | site_id | meta_key | meta_value |
+———+———+————-+——————————————+
| 8 | 1 | site_admins | a:1:{i:0;s:5:”adm”;} |
| 467 | 21 | site_admins | a:1:{i:0;s:5:”adm”;} |
| 245 | 13 | site_admins | a:1:{i:0;s:5:”adm”;} |
| 45 | 3 | site_admins | a:1:{i:0;s:5:”adm”;} |
| 28 | 2 | site_admins | a:1:{i:0;s:5:”adm”;} |
| 62 | 5 | site_admins | a:1:{i:0;s:5:”adm”;} |
| 126 | 8 | site_admins | a:1:{i:0;s:5:”adm”;} |
+———+———+————-+——————————————+

Create a site_admin entry for your new site:

insert into wp_sitemeta (site_id,meta_key,meta_value) values (’22’,’site_admins’,’a:1:{i:0;s:5:”adm”;}’);

Im my example, 22 is the site ID, obtained from the first query.

Following that, refresh your dashboard GUI and you should be able to find your “Site Admin” panel there. From here you can define your desired settings for the site as you see fit.

A new blog engine!

Tuesday, August 12th, 2008

I have moved to a new blog system. From Serendipity to WordPress. I hope this will be for the best.

During the process of importing the blog’s content, most posts got into the “uncategorized” category. I am working on it.

If you got here through some external links, you have probably got to the main page due to broken links. I hope that the search will work very soon, so you will be able to find the issue you were aiming at. In the meanwhile, as a workaround, I will add a plain (non-google) search inside the blog. Later on, when Google decides to index the site correctly, I will remove it.

During the migration process, I have noticed some comments which were ignored by me, by a mistake. I will respond to these ASAP.

The blog’s design is not fully implemented yet. I hope it will be soon.

Enjoy the blog!