You do not have sufficient permissions to access this page - wordpress

I recently set up a local copy of Wordpress, added some content and created a child theme. Then I moved it to my webserver, changed the config file, changed the "localhost" occurences in my SQL file to my online URL. I also changed my database prefix from what I had locally on all tables and in the config file.
Everything works well on the outside. But then as I log-in is get the:
You do not have sufficient permissions to access this page.
Update:
Even my local install of wordpress is giving me the same problem.

First thing to do is check your directory permissions. Generally, directories should be 755, files should be 644. See Changing File Permissions « WordPress Codex and Hardening WordPress « WordPress Codex.
Also, since you changed your DB table prefix, see this: How to solve ‘You do not have sufficient permissions to access this page.’ in WordPress.

The most common cause is an upgrade that didn’t complete.
Check it ;-)

Related

Not Acceptable?

My site is running but I could not log in to admin dashboard, got this error
Not Acceptable!
An appropriate representation of the requested resource could not be found on this server. This error was generated by Mod_Security.
After googling I found out it has to do with mod_security. I tried every approach to fix it: changed my plugin folder name, tried disabling mod_security with .htaccess but the error remains the same.
Are there other alternatives that I could take?
Difficult question! To be honest, I wouldn't try to fix it. I would suggest copying files and database to a local WordPress. If everything is running on you local machine, I would delete the WordPress server version and install a new WordPress and copy the database and all the files.
If you think of the hours, you try to fix it instead of copy the whole WordPress and install a new one.
please delete you .htaccess file from the root directory and try to login into wp-admin. Once login gets successfully then regenerate the .htaccess file.
For regenerate the .htaccess file you need to follow the below steps:
Go to setting -> permalink -> change permalink into default.
And save the setting.
After save setting then change permalink into the post.
Now you can see that the .htaccess file gets generated successfully.

Wordpress welcome page installation

I have a Wordpress site I am woking on and I now cannot get to it.
http://zma.uk.com/zmademo/
It just brings up this page [image attached
Is this normal of have I been hacked?
I've already installed the WP and it was working fine, now this.
Please help.
The WordPress welcome page appears (as #Stanimir says in his comment) when wp-config.php file is not present at the root of the WordPress install.
If you have already proceeded to the install, the file has been deleted or moved.
There's no need to do it again, you can copy wp-config-sample.php and modify it with the same db informations and table prefix.
AUTH_KEY, SECURE_AUTH_KEY, and LOGGED_IN_KEY, NONCE_KEY, are used to insure better encryption of information stored in the user's cookies.
The four salts are recommended, but are not required, because WordPress will generate salts for you if none are provided. They are included in wp-config.php by default for inclusiveness.
Save it as wp-config.php and place it in the main WordPress folder.
You can also, verify if the file exists and its permissions, the file permissions for it is 644.

wordpress database not showing in PhpMyAdmin

I am new to wordpress and have bought udesign theme from themeforest. from my Plesk I have installed WP and then from the dashboard of WP tried to upload the theme, but failed. hence went directly to dedicated server and hosted on the root folder.
Theme started reflecting on the dashboard and I have started customization. Once site completes I need to move the site to production server. When I check PhpMyAdmin from the plesk, it shows there is no DB table. how do I copy/move the site without DB?
Can i manage site without PhpMyAdmin? like copying the entire assets to new server and it starts working automatically?
Please help me to find DB or Let me know how to work with the themes to make sure everything in right place.
Many Thanks,
Gururaj
If you’ve ever had the need to find the name of your WordPress database, then there’s an easy way to do that – simply look for it in your wp-config.php file located in the root folder of your WordPress install.
Accessing Your WP-Config.php File
If you are doing something where you need the name of your database, then I’m assuming you have access to your server.
Simply go to the main folder of your WordPress install and locate the file called wp-config.php.
Edit file and find name in:
define('db_name','your database here');

Editing .htaccess without FTP access through Wordpress

I have no access to my FTP but I'm able to edit the web through Wordpress. Is there any way I could perhaps generate the .htaccess file through the admin framework? I know there might be a plugin to do that, but bear in mind I have no FTP access and the plugins require it to be installed.
I need the .htaccess file to redirect the user to another site.
I know this might strike you as weird and stupid, but this is due to the company's central decision to keep the site hosted by, I guess, a "friendly" hosting company. There's no way of recovering the login/password for FTP, so this might be the only solution.
Please, try posting constructive comments only, no "contact the hosting company". If I could, I would.
If your hosting company has set up wordpress correctly, then there is no way to do this, because unix permissions should make .htaccess read-only to the owner of the web server.
If the company has not done this, and if you have a way to change the templates, you might have success by creating a template that contains php code to open and write the .htaccess file.
Sample code to be put at the top of the header.php:
echo 'Current dir: ',getcwd(),"<br>\n";
if ($handle=opendir('.')) {
while (($file=readdir($handle))!==false) {
$ok=(is_writable($file) ? "ok" : "can't write");
echo "file '$file': $ok<br>\n";
}
closedir($handle);
}
This is to test you're in the root directory of your wordpress installation. It should give you the current directory, a list of all files in that directory (expect .htaccess, index.php, and various wp-* files), and their writability.
Once you've checked everything is correct, add
file_put_contents('.test', "RewriteEngine On\nRewriteRule ^(.*)$ site.com$1 [R=301,QSA,L]\n");
echo("<code><pre>-------- included file starts here\n");
include(".test");
echo("-------- included file ends here</pre></code>\n");
to the php code. This writes to a test file and includes it so you can check if everything is ok. When you've checked the file contents, replace .test with .htaccess.
WARNING: You should be VERY sure about the content of .htaccess. file_put_contents doesn't append the new string, it overwrites the whole file. Once you've written a bad .htaccess file, you might not be able to ever change it again, because the web server will redirect you to the new site instead of executing the script on the old site.
I am sorry for your situation. What is the hosting company (will keep this in mind if I ever use them). To try to help:
Do you have access to CPanel? Most hosting providers give it out of the box. Cpanel has a file manager.
Research Wordpress file managers (http://wordpress.org/plugins/wp-filemanager/)
How to edit wordpress .htaccess file from hosting Cpanel: If you are currently unable to login in your wordpress dashboard, or facing 500 internal server error. There is 90% possibility that you were editing your .htaccess file from your wordpress dashboard. In this situation you can only fix your wordpress .htaccess file by editing it from cpanel. Editing .htaccess file from wordpress dashboard is little risky with .htaccess editor plugins. If you will implement any wrong code then you might face 500 internal server error and your site might crush. So first you should take a backup of your existing .htaccess file before editing it. If you have a backup of your wordpress .htaccess file then you can upload it through your hosting cpanel also.
https://howtoways.com/how-to-edit-wordpress-htaccess-file-from-hosting-cpanel/

WordPress and Windows IIS Server Problems

I am currently working on a WordPress project on a remote IIS server. I consider myself well versed in the use of WordPress, however, most of my previous projects have been on Apache servers and I am really running into problems on the IIS server.
I have contacted the host, and made sure that I have the correct file permissions. However, I cannot upload files or edit themes/plugins from the WordPress backend.
For example, when I use the WordPress theme editor panel, I make changes in the text, but when I click save there is no "Your changes have been saved message" and the file is just reverted to what it was before.
When I try to upload an image inside a post, I receive the following message:
The uploaded file could not be moved to C:\xxx\wwwroot\xxx.com\www\dev/wp-content\uploads.
I notice the slash to the right of dev is incorrect, but I cannot figure out how to change this. I have tried defining this in the wp-config file with several different variations with no luck. For example, I have tried adding define('UPLOADS', '\wp-content\uploads') and I have also tried using the absolute path.
Does anyone have any idea how I can fix this? I need to get this squared away as soon as possible, but I am not sure where to go from here. Any advice is appreciated.
Thank you for reading.
.
.
.
Edit
I have tried altering the "upload_path" via wp-admin/options.php with no success, and the following results:
When I try the absolute path, C:\xxx\wwwroot\xxx.com\www\dev\wp-content\uploads, I get the following
The uploaded file could not be moved to C:\xxx\wwwroot\xxx.com\www\dev\wp-content\uploads.
When I try wp-content\uploads in the "upload_path", I get the following
The uploaded file could not be moved to C:\xxx\wwwroot\xxx.com\www\dev/wp-content\uploads.
Chris's Blog » Wordpress upload permissions on IIS 7 Fix or Google for the IIS6 fix:
...You need to give the IUSR account Read/Write/Modify permission on
your wp-content folder.... and you need to give the IIS_IUSRS group
Read permissions on your “C:\Windows\Temp” folder.
See 10 Reasons Why Not to Host Your Wordpress Blog on a Windows/IIS Platform
you need to give php temp dir full permissions (iusr) (network service) c:\winnt\temp is the default upload dir before it moves to the wp site so this has to be set
in php admin (in iis applet) u can change the temp dir if your not liking the fact its in your NOS dir
next issue u will have is max_fileupload size also in php admin
iis works great best if your the admin of the server to quickly make the needed changes

Resources