WordPress Admin Loging 404 Error re .htaccess - wordpress

I've a WordPress site hosted on OpenShift and I can't access my admin login page. When going to the /wp-admin or /wp-login.php pages I get a 404 / "page not found" error.
WordPress forum suggestions have advised deleting the .htaccess file at the app's root and the app shout reset the file granting me access. Because OpenShift uses a different directory structure, I can't find the correct .htaccess file specific to WordPress.
Can anyone advise?

Your .htaccess file should still be located with the core wordpress files, are you accessing the server via sftp? Are you viewing hidden files?
Should be located in /app-root/data/current/

Related

Redirection Error When Accessing the wp-admin Page on a WordPress Site Hosted on GCP App Engine

I have a problem with my WordPress site hosted on GCP App Engine. When I try to access the wp-admin page, I first receive a 302 followed by a 301 that redirects me to the homepage.
I have already tried to deactivate my theme and all the plugins from the database, but that has not changed anything. I also added var_dumps to index.php in the wp-admin folder, but none of them are executed because the redirection happens before.
I also deleted my .htaccess file to make sure the redirection is not coming from there. Could you give me some leads to solve this problem? Thank you in advance.

Accidently deleted files in cPanel home directory

I just wanted to delete the files under the public_html folder. But accidentally I deleted all the files under the home directory, like- etc, logs, mail, public_html, public_ftp, ssl, tmp, www. I have no backup. Now, I just created the public_html folder and put the WordPress files. When I browse the site, it says ---
"Forbidden
You don't have permission to access this resource. Server unable to read htaccess file, denying access to be safe
Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request."
Could you please help me out? I'm so much confused.
if you are using shared hosting contact your hosting provider they might have a backup for your full /home directory and they can restore if from their end with the latest backup available.
if you are running a dedicated VPS I am not sure how it should be accessed

Cannot able to access wp-admin page

I have a wordpress website in my ubuntu server. Eg, my website url is
xyz.com. when i'm trying to access wp-admin page it should be xyz.com/wp-admin. But it redirect to another url like xyz.com/xyz/wp-admin
Can anyone give solution for this issue?
Wordpress admin dashboard is /wp-admin from whatever directory your website is installed.
For instance, you have a website https://dijofrancis.com and wp is installed in the root directory then your admin url is https://dijofrancis.com/wp-admin
If you paste your .htaccess file (situated at the root of your webserver directory) we could help a little more.
I once had a similar issue when I stupidly made a global redirect with a wildcard on my website.
If you say that when you access:
xyz.com/wp-admin
it redirects you to
xyz.com/xyz/wp-admin
Then it might be a permalink issue.
Re-make your permalinks from WP dashboard.
Also, you can try to use
https://wordpress.org/plugins/wps-hide-login/
and test from another link (if issue is permalink, maybe WPS HL will interact with wp-admin in a way that will work for some reason)

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.

Any way of mapping the wordpress installation to the website root?

I installed Wordpress on a cPanel account, and it's accessible by visiting website.com/wordpress. What would I need to do to make it so that when a user visits website.com , he actually sees the website.com/wordpress ? I think there is a better solution than adding a redirect inside an index.html.
You can use .htaccess to make the wordpress location as your Directory index using a .htaccess file in your root above wordpress folder..
and include following in that .htaccess file
DirectoryIndex wordpress/index
Though I do not know about the cPanel admin section - look into your domain configuration or general settings: There should be a place where you can set the the target of the domain or your 'home directory'. it currently should point to the root directory '/'.
Simply let it point to the '/wordpress' folder and you should be fine. If you do not have access to the domain config, install the wordpress directly into the root directory.

Resources