Skip to content Skip to sidebar

This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

This topic contains 3 replies, has 3 voices.

Last updated by Osama Mersal 1 year, 11 months ago.

Assisted by: Osama Mersal.

Author Posts
August 22, 2023 at 2:44 pm #14272321

deanL-2

I'm trying to set up WPML for a subsite of a multisite set up, after clicking the final button, I got the error saying "Sorry, you are not allowed to access this page."

I followed the instruction on https://wpml.org/forums/topic/setup-sorry-you-are-not-allowed-to-access-this-page/ and added the snippet to functions.php but that didn't solve the problem.

What else am I missing?

August 22, 2023 at 7:54 pm #14273451

Mateus Getulio
Supporter

Languages: English (English ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Hi there,

Thanks for your contact.

Before your ticket is assigned to one of my colleagues, please allow me to walk you through some initial debugging steps. This will help speed up the support process.

By looking at your debug info, it is possible to see that the WP Memory Limit is set to 64M, while the recommended is 256. Changing it can solve the problem. Please follow these steps:

- Find your wp-config.php file in the root directory of your WordPress installation
- Open the wp-config.php file with a text editor, then locate the line that includes: define('WP_DEBUG', false)
- Then add after it, the below line of code: define ('WP_MEMORY_LIMIT', '256M');
- Save the wp-config.php file, then refresh your website

Now try to apply again the solution of adding the code snippet in the functions.php file and check if it helps.

Looking forward to your reply. Thank you.

Kind regards,
Mateus.

August 22, 2023 at 10:37 pm #14273951

deanL-2

Hi Mateus, I added the WP Memory Limit but the problem still persists. Looking at the code snippet, it seems has to do with editing database, can you tell me if I can do that directly in the database? Which table to look for?

August 23, 2023 at 8:41 am #14275947

Osama Mersal
WPML Supporter since 02/2020

Languages: English (English ) Arabic (العربية )

Timezone: Africa/Cairo (GMT+03:00)

Hi,

I'm Osama from WPML forums support. I'll be glad to help you today.

1) You might need to reset WordPress capabilities to fix this issue. You can reset them using a custom code or a plugin. Please check the following approaches to reset user capabilities.

1- https://wordpress.org/plugins/user-role-editor/
2- https://wordpress.org/plugins/capability-manager-enhanced/
3- https://wordpress.stackexchange.com/questions/105241/reset-default-roles-and-capabilities

❌ Please backup your database before performing the reset process ❌

2) It's unrelated to the issue, but according to your Debug.info, the WP memory limit needs to be increased. PHP memory is fine, but WordPress uses 40Mb as default. The minimum requirements for WPML are 128 MB. (Kindly check this page https://wpml.org/home/minimum-requirements/)

You can increase it by adding the following code in your wp-config.php file right before the /* That's all, stop editing! Happy publishing. */ line:

/* Memory Limit */
define('WP_MEMORY_LIMIT', '256M');
define( 'WP_MAX_MEMORY_LIMIT', '256M');

Best regards,
Osama

August 23, 2023 at 9:32 am #14276535

deanL-2

Turns out one of the users does not have role capability. I don't know how that happened, but the website was migrated from another server and wasn't done by us, maybe it was already broken before we took over. After granting the user a role, I was able to complete the set up. All is good now, finally!