Public and Private Keys are Incorrect for user

For some time, I'm getting the error Public and Private keys incorrect for wp-user when I try to update a plug-in. I've a CentOS 7 VPS setup with a LAMP stack. I've installed and configured my Wordpress installation which works fine except that I can't update plug-ins or make image uploads via the Wordpress control panel. I let Wordpress access to my server using SSH. I've followed this tutorial to do so. Basically there is a specific user in my …
Topic: ssh Wordpress
Category: Web

AWS Lightsail Wordpress - connect to database on instance using mysqli

I have a wordpress website hosted on AWS Lightsail. On that website, I would like to use a shortcode to retrieve data from a database using mysqli. However, everytime the script that connects to the database is executed, I receive a connection error. The database is on the same AWS Lightsail instance. I was wondering if I need to establish an SSH-tunnel because this is also needed if I connect to phpmyadmin. But since the script is executed on the …
Category: Web

SSH git — How to pull a folder from repo, but not delete other directories & files on deployment server

I'm at a point in my git education where I've refined my .gitignore file such that when I push from my local development machine to a remote repository (which happens to be on Azure, but it could just as easily be on github), the folders and files in the repo are precisely how I want them to be. That is: wp-content/plugins/my-custom-plugins wp-content/themes/my-custom-theme ...and that's basically it. I don't want the wp-config in the mix, or any of the stock WP …
Topic: ssh git Wordpress
Category: Web

How can I use WP-CLI commands without --allow-root

I wanted to use WP-CLI commands in my putty WordPress 5.5.1 & Ubuntu 20.04 Droplet but “When I use Wp commands without –allow-root then It shows an error that you are accessing as the root user,” and I know it’s un-secure to use –allow-root. Please Can anyone help me in accessing wp commands in my Putty without –allow-root.
Category: Web

WPTerm ssh connection not working

I'm running wordpress on a docker container. I've logged in via the admin console and installed the WPTerm plugin. When starting the WPTerm and using ssh with the following arguments ./ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o GlobalKnownHostsFile=/dev/null -v -T -i ./id_rsa [email protected] I get the error ... debug1: SSH2_MSG_SERVICE_ACCEPT received debug1: Authentication succeeded (none). Authenticated to 172.10.10.2 ([172.10.10.2]:22). debug1: channel 0: new [client-session] debug1: Entering interactive session. debug1: pledge: network shell request failed on channel 0 I have tried different …
Category: Web

Wordpress Redirects to a cancelled domain, need to change it but can't get to the admin portal

I am working with a WordPress site on AWS wherein the site was mapped to a specific domain. That domain has long since been sold and canceled, so I want to change the domain to something else to access the site content. The issue is, when attempting to navigate to the admin portal through /wp-admin or /wp-login.php or similar, the site redirects me to the naked domain which obviously fails since the DNS is no longer configured there. Can you …
Category: Web

SSH vs Wordpress

To modify files via SSH I need to have the files owned by ubuntu:www-data. But for wordpress to be able to install or update plugins I need to have the files owned by www-data:www-data. Any way around changing ownership all the time aside from manually adding the plugins? I have tried setting file/folder permissions to 664 and 775, 2664 and 2775, but it doesn't help. Not sure what the difference is between 644 and 664 or 775 and 755 if …
Category: Web

How To Upload Existing WordPress Site To WordPress Multisite Using SSH

I have a WordPress site that needs to move into a WordPress Multisite. I tried to find the site file to upload in wp-content/uploads/sites but I couldn't locate the file. I also tried to upload the MySQL databases but I could not change the Multisite site database prefix. Does anyone have any idea on how I can import a site into Multisite? The fully way instead of just the pages and posts using WordPress import.
Category: Web

Server configuration for WordPress - Do I need install PHP-SSH extensions for Wordpress on Fedora28?

Migrated from Stackoverflow & Unix & Linux: Recently I tried to setup a Wordpress server on Fedora28 based droplet on Digital Ocean. A followed some tutorials and the result was the same: After a "successful" Wordpress installation I couldn't add new plugins etc. Followed some resolving methods(debug, tutorials etc.), I found that it could be something about the unsuccessful SSH connection between Wordpress app and Wordpress.org. Then in a tutorial a read the following, which is for Ubuntu and for …
Category: Web

enable SFTP via SSH keys in wordpress

can anyone help me define('FTP_PUBKEY','/home/use/.ssh/id_rsa'); define('FTP_PRIKEY','/home/user/.ssh/id_rsa'); define('FTP_USER',''); define('FTP_PASS',''); define('FTP_HOST','127.0.0.1:22'); install at located home/user/wordpress keys located at getting incorrect keys keys permissons 600, 600 folfer 755
Category: Web

How to disable XML-RPC from Linux command-line in a total way?

I read near the end of this guide regarding utilizing SSHguard to protect WordPress from Brute force attacks that after configuring SSHguard the relevant way, one must: disable XML-RPC by blocking all remote access to /xmlrpc.php in your web server configuration. I don't use XML-RPC in any of my websites. I use Nginx as my web server. I'm not sure what is the best way to totally block XML-RPC. Nginx conf for each site? WP-CLI operation per site? What is …
Category: Web

WP-CLI alias: connect with ssh proxy

I have a wp-cli.yml file that defines an alias for a remote host: @origin: ssh: myserver.example.com path: /path/to/htdocs This would normally allow me to use wp @origin command to run remote commands on the other host. In one case, however, the remote host is only visible through an SSH proxy, so my system has an SSH config entry in ~/.ssh/config: Host myserver.example.com ProxyCommand ssh -q -W %h:22 proxyserver.example.com ForwardAgent yes This instructs it to first connect to the proxy server, …
Category: Web

Index.php using 100% CPU

I am using godaddy 32 gb(RAM), quad core(CPU) dedicated server. My site is working properly till today somehow its take to long to load so i am monitoring server in SSH using top command and i had found that my wordpress index.php is continuously requesting. I can see that there are 8-10 request of index.php which are in running stat every request runs till 3-4 second and after that a new request is come. I had not added any additional …
Category: Web

I can't login to wordpress dashboard without SSH

My friend gave me a username and a password to his wordpress site. Now when I try to login to the dashboard, it tells me I have the wrong username or password. He also gave me a SSH port number and a username and password for SSH. Now I don't know what I'm doing wrong but I can't seem to log in to the dashboard. I know I have to use the SSH credentials and port number but I don't …
Category: Web

Unable to update WordPress or install plugins/themes

I can't update WordPress from the back-end or install themes or plugins. Each time I try, I got this type of error: Unable to locate WordPress Root directory.. I've installed my WordPress in a sub-directory. I have /conclave folder for WordPress files and /content for themes, plugins and uploads. My WordPress works fine, I can write posts, pages, and upload medias. To allow me to update WordPress from the back-end, I've followed this tutorial. I'm quite lost about what to …
Category: Web

Force Jetpack to use og:url with http on an https website

I moved my site from http to https, but I wish to preserve my facebook likes. From what I read, I should use the og:url metatag so that facebook will know how to fix the likes on that page. I tried the following code, but it fails to change my urls from https to http in jetpack. Any suggestions? function https_to_http_url( $url ) { $url = str_replace('https://', 'http://', $url ); return $url; } function jetpack_og_url_https_to_http( $tags ) { // unset( …
Category: Web

After upgrade to php 7 plugin/them updates broke

I upgraded my Ubuntu server to php 7 and setup ssh2. Afterwards, my WordPress plugins/themes will not update. I am receiving the Unable to locate WordPress Content directory (wp-content). This feature worked fine prior using php 5. My permissions were not changed and remain 755 (folders) 644 (files). I am using the same ssh user as before, which is my primary user on the server. I unzipped the php7.zip file to create the pecl-networking-ssh2-php7 directory in my user's home directory. …
Category: Web

Upgraded to php7.0, now ssh updates don't work

I updated my server from Ubuntu 15.10 to Ubuntu 16.04, and one of the things that updated was PHP. After the upgrade, doing plugin updates over ssh don't work any more. At first it was prompting for FTP login credentials until I installed php-ssh2 (which cautions that it's based on a git snapshot). Now when I try to upgrade a plugin, it says An error occurred while updating WP to Twitter: Unable to locate WordPress Content directory (wp-content). And in …
Topic: ssh php Wordpress
Category: Web

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.