Wordpress Forbidden Update Pages - wordpress

I already tried to look for some solutions about this, but i didn't find any.. Maybe you guys can solve my problem.
I can't update my Wordpress page
Forbidden
You don't have permission to access /demo/myfolder/wp-admin/post.php on this server.
Apache Server at www.my-site.com Port 80
some say to delete my .htaccess file and refresh the page. that didn't work..
Right now here's the content of my .htaccess file
# BEGIN WordPress
# END WordPress
I also tried "wp-admin and right click on the very folder, give permission 777"
Internal Server Error File "/var/www/vhosts/my-site.com/httpdocs/demo/myfolder/wp-admin/post.php" is writeable by group suPHP 0.7.1
Thanks

If you have ftp access go to wp-admin and right click on the very folder, give permission 777 (if you are using Filezilla).

777 permissions are unnecessary and very insecure. See the docs at WordPress.org Changing File Permissions « WordPress Codex for the correct file/folder permission structures and how to change them with an FTP client.
If that doesn't work, ask your webhost.

Related

WordPress: You don't have permission to access /wp-admin/ on this server

Forbidden
You don't have permission to access /wp-admin/ on this server.
Let me know how I can solve it.
I tried it by rename the WordPress plugin file but it didn't work.
Go into your server files and make a local backup of your .htaccess file, then delete it from the server. If it fixes the issue, then you'll know it was corrupt and you'll want to go to settings -> permalinks and hit 'save changes' to generate a new one.
If it doesn't work, upload the backup back in.

WP-INCLUDES folder returning error 403

I have a website on WordPress with SSL installed through Cloudflare. My server has a Windows/IIS operating system.
I have a issue on the WP-INCLUDES folder returning error 403 with several WordPress and Template functions not working.
I would like to know if any of you guys know how to fix this issue and could help me. I’ve already set all permissions on IIS but without success.
If you need more details you can check the website on www.sospdf.com.br.
Thank you very much.
What are you trying to do with the wp-includes folder? I believe it is common for wp-includes to be forbidden as it can be a security liability. If you're changing something in the wp-includes folder you may want to do this through SFTP.
If pages other than /wp-includes/ are returning 403 or forbidden here are some of the most common causes:
1.) 403 caused by a wordpress plugin, particularly a poorly configured security plugin. Deactivate plugins and reactivate one at a time
2.) Corrupt .htaccess file. Download your .htaccess file via FTP so you have a back up copy. Delete .htaccess from your server and then generate a new
.htaccess by logging into your theme admin and going to settings >> permalinks
3.) Check file permissions (which is seems like you did)
More information on the rationale behind why it might be better for your WP-INCLUDES folder to return 403 can be found in the Wordpress Codex on hardening wordpress in the WP-INCLUDES section.

WordPress won't allow file upload - file cannot be moved to wp-content/uploads

When I try to upload files to the WordPress media library, I get an error saying that file cannot be moved to wp-content/uploads. I tried changing to 777 permissions (just to test) and it still did not work. I tried the following link:
http://2surge.com/how-to-fix-the-uploaded-file-could-not-be-moved-to-wp-content-error-message/
which says to give the nobody user permission, which did not work.
I also tried adding the following link:
https://www.digitalocean.com/community/questions/wordpress-the-uploaded-file-could-not-be-moved-to-wp-content-uploads
which says to add FTP connection data to wp-config.php, which did not work.
I tried to upload manually through FTP and then use the Add From Server plugin, however when given the correct connection information to Add From Server (which on other sites I've done with these permissions/ownership isn't even asked for), the plugin cannot connect.
Can anyone offer a solution?
Thanks in advance!
Try Like This in Terminal-sudo chmod -R 777 /opt/lampp/htdocs/wptest1/wp-content/uploads/2017/07 after creating suitable folders like uploads>2017>07 in wp-content folder in wordpress

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.

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/

Resources