Connecting your website to 10Web dashboard is typically a one-click process once 10Web Manager is installed and activated. However, in some cases, connection errors may arise. This guide outlines how to resolve these issues.
WordPress file permissions
Understanding and setting the correct file and folder permissions is crucial for WordPress site security and functionality. File permissions dictate the levels of interaction that users or system processes can have with a file or directory. These interactions can be categorized into three main actions:
- Read: Ability to view the content of a file or see the files listed in a directory.
- Write: Capability to alter a file's content or add or remove files within a directory.
- Execute: Permission to run the file as an executable program or script, or perform operations within a directory.
Every file and directory possesses a unique 3-digit numerical code representing its file permissions. Each digit signifies the level of permission—read, write, and execute—granted.
How to fix WordPress file and folder permissions
Important:
Before making any changes, ensure that you have a backup of your WordPress site. This is a safety net in case something goes wrong.
10Web Manager plugin requires read, write, and execute permissions. To fix the error, you will need to change both file and folder permissions.
Accessing website files and folders
To start modification of WordPress permissions, you will need to sign in and connect to your website files and folders. To do this, you can use cPanel, FTP client, etc.
- Log into your hosting provider account
- Connect to your website files via your choice of protocol to get started
Note:
If you don't have access to credentials for connecting to your website files, contact your hosting provider for assistance and for modifying WordPress permissions.
Modifying folder permissions
Once you have successfully connected, you can now start to modify the permissions.
- Locate the root directory of your WordPress website
Note:
A Root directory is the main folder where your WordPress files reside, usually named public_html, www, or after your site’s title.
- Select all folders wp-admin, wp-content, wp-includes
- Right-click and select File Permissions
- In the pop-up, enter 755 as the Numeric value
Note:
Here is a breakdown of what this code means. The owner of the folder can read, write, and execute commands (read, write, execute). Group members and other users can read the contents and enter the directory, but they can't write new files or folders.
- Check the option Recurse into subdirectories
- Select Apply to directories only
- Click Ok
Modifying file permissions
Once you are done changing the folder permissions, you will need to change the file permissions as well.
- In the root directory, select all files
- Right-click and choose File Permissions
- Enter 644 in the Numeric value box
Note:
Here is a breakdown of what the file code means. The owner of the file can read it and make changes (read, write). Everyone else, whether they're in your group or not, can only read the file.
- Check Recurse into subdirectories
- Select Apply to files only
- Click Ok
To verify changes, refresh your WordPress site to ensure it's functioning as expected. If any issues persist, consult your hosting provider.
FS_METHOD
The FS_METHOD is a constant used in WordPress to specify the file system method to use when installing updates or performing other file operations. It's generally defined in the wp-config.php file. If your FS_METHOD configuration has been changed, you will get the error message as described at the beginning of the article.
Here are the method options:
- Direct ('direct'): Files are written directly without any intermediary steps. This method requires that PHP runs with permissions to write files, which might be a security risk on shared hosting.
- FTP ('ftp') or FTP SSL ('ftps'): Uses FTP or FTPS (FTP over SSL) protocols for file operations. If you choose this method, you will also need to specify FTP credentials (hostname, username, password) in the wp-config.php file.
- SSH2 ('ssh2'): Uses SSH for file operations. Like FTP/FTPS, this method requires additional constants to be set for hostname, username, and password.
- Auto ('auto'): WordPress will choose the method automatically, falling back in the order of Direct, SSH2, FTPS, and FTP.
How to set the FS_METHOD
By default, WordPress will use the direct option of the FS_METHOD. This is the option needed to give 10Web Manager permissions.
Important:
Before making any changes, please make sure that you have a backup of your website.
To change the FS_METHOD option
Note:
You will need to connect to your website files in order to make the changes. If you don’t have access to the credentials for connecting, contact your hosting provider.
- Log in and connect your website files using your choice of protocol
- Once logged in, click on the root directory and find the wp-config.php file
- Edit the wp-config.php file using your editor of choice
- In the wp-config.php file, find the line that reads: * That's all, stop editing! Happy blogging. */
- Add the following code right above that line:
define('FS_METHOD', 'direct');
or if you already have the code defined with a different value, change it to 'direct' - Save the file and upload it to your server
To confirm that your modifications have taken effect, reload your WordPress website and check for smooth operation.
If problems continue, reach out to your hosting provider for assistance.
Website is unavailable or localhost
The 10Web Manager can only connect to live websites. Ensure the following:
- Your site is not in maintenance mode (either WordPress default or plugin-induced).
- The site is not hosted on localhost. On many computers, localhost is an alias for the IP address 127.0.0.1. You can verify this by using a DNS checker like DNS Checker.
- Your site is not suspended by your current hosting, and the domain name it is pointed to has not expired.
- No critical PHP errors are making the site inaccessible.
Blocked REST API route
If your site’s REST API route is blocked, this can prevent connection to the 10Web dashboard.
Common causes
- Firewall or Security Settings: Firewalls or security groups can block requests to certain IP addresses or ports. If your REST API is behind a firewall or in a network with strict security rules, some requests might not reach the server.
- Permission Issues: If your API restricts access to specific users or roles, and the permissions aren’t set correctly, the route may be blocked.
- CORS Policy: Cross-Origin Resource Sharing (CORS) controls which websites can communicate with your API. If your API is accessed from a different domain and the server doesn’t explicitly allow it, the request will be blocked.
- Rate Limiting: APIs often limit the number of requests that can be made in a specific period. If too many requests are sent, subsequent ones might be blocked.
- Authentication/Authorization: If the route requires authentication or authorization and the request doesn’t meet these requirements, it will be denied.
- URL Errors: A small mistake in the URL (like a typo) can prevent the route from being recognized, causing it to be blocked.
- Server Configuration: Problems with server settings, such as in configuration files like .htaccess, can block the route from working properly.
- IP Blocking: Servers may block requests from specific IP addresses as a security measure. If your IP is blocked, your requests to the route will be denied.
How to check if the REST route is blocked
Blocked REST routes can be a frustrating issue, but with a clear understanding of what causes them and how to check and fix them, you can ensure that your API remains accessible and functional. By systematically addressing potential causes and following the steps outlined above, you’ll be able to troubleshoot and resolve these issues effectively.
- To check if the REST route is blocked, navigate to Get URL with Curl and check these two links replacing yourdomain.com with your website URL:
curl https://yourdomain.com/?rest_route=/tenweb/v1/get_check
curl -X POST https://yourdomain.com/?rest_route=/tenweb/v1/post_check
- Check the Response:
- If the response is {"code":"ok"}, your REST route is working correctly.
- If you receive a different response (e.g., rest_no_route), your REST route is blocked and needs fixing.
Steps to fix a blocked REST route
Deactivate security plugins/services:
- Some security plugins or services can interfere with your API or REST routes. Temporarily disable any security plugins or services, and then test the route again using the CURL commands mentioned above.
Contact your hosting provider:
- If deactivating security plugins doesn’t resolve the issue, reach out to your hosting provider.
- Ask them to whitelist the following IP addresses to ensure your REST routes function correctly:
- 52.170.74.61
- 52.142.61.111
- 20.98.84.151
- 13.92.59.87
- 52.151.28.87
- 40.117.75.176
- 40.114.115.187
- 13.66.227.49
- 13.90.229.95
- 52.191.187.114
- 72.174.6.22
Should none of the solutions above work, please contact our Customer Care team for focused assistance.