Wordpress: redirecting to my old public ip

I started to develop my own wordpress site, that I hosted locally. I am using Apache for hosting and mariaDB for DB. I accessed the site through my public ip, that in my case was was xxx.xxx.1.163. I could also access my site thorugh 127.0.0.1. I set the wordpress site up and everything worked fine. PROBLEM Until I moved from one place to another with my computer. Now I can not access my site anymore. I have been struggling with …
Category: Web

Unable to properly load Wordpress Admin page

I'm trying to fix a website for a company I used to work for. It looks like the CSS has been stripped from the page (won't load in any browser, I've tried multiple), the Wordpress theme I had installed is no longer functional, and the wp-admin login page that used to show is no longer loading - there is an ERR_NAME_NOT_RESOLVED that displays when I try to load the login page, and looking in the console on the homepage shows …
Category: Web

REST api returns 404 on some WordPress sites

My code: <?php public function __construct() { $valid_ips = array( '1.2.3.4', ); // It seems the problem is here! Because it returns 404 which means the endpoint is not registered. if (in_array($_SERVER['REMOTE_ADDR'], $valid_ips)) { add_action('rest_api_init', array($this, 'register_my_endpoint')); } } public function register_my_endpoint() { register_rest_route('items/v1', '/get-items', array(array( 'methods' => 'GET, POST', 'callback' => array($this, 'some_func'), 'permission_callback' => '__return_true' ))); } The problem is that it is working and registering the endpoint on some sites but not in the others. Am I …
Category: Web

WordPress in AWS Lightsail - restrict public IP

I have WordPress instance in AWS Lightsail with static public IP. I also created DNS record with domain to redirect to that IP. How can I hide/restrict public IP? Meaning I can now go to just that IP but I don't want public to be able do it, only to domain. I have cert installed for domain but not for IP. user goes to -> https://www.hello.com/ (1.1.1.1) - ALLOW user goes to -> http://1.1.1.1/ - restrict
Category: Web

Change of IP Address

I have a site developed by a third party using wordpress however we could not log in the Admin page currently due to change of IP address recently. The login page https://domain/wp-admin has directed me to "Forbidden" error page instead. I also do not have the database file to do further amendments. Can anyone help on this? Thanks.
Category: Web

IP Address Whitelist to Allow WordPress Core Auto Updates

I'm working on a site based on a server with quite strict firewall rules. It won't allow anything running on the site to connect an external server unless its IP address is explicitly whitelisted. Does anyone know where to find the IP address(es) of the WordPress core updater? Thanks
Category: Web

Plugin for limiting user registration based on ip with expiry period?

Unlike most of the spammer/spambot plugins out there, which stop registrations from a known list of spam IPs and email domains, I need to stop malicious users who may try and register more than one account from the same ip address. Their intentions may be to either harass people in the comments once they've been banned on other accounts, or they may try and play games with one of my submission forms and submit duplicate results to attempt to ruin …
Category: Web

Comment IP Plugin - Fixing onfocus='this.select()'

I'm the process of getting an old plugin to work and what I need help with, if possible, is to review the "error" I'm getting. No matter from who the comment is made, all I get is this: onfocus='this.select()' I'm not good enough to fix this and so, if anyone can help I appreciate it. This is the full code: defined('ABSPATH') or exit; add_action( 'load-edit-comments.php', array ( 'Track_Comment_IP_Column', 'init' )); class Track_Comment_Column{ protected $col = ''; protected $filters = array …
Category: Web

How can I add IP address to my post?

" After completing the form, the following information should be displayed: "Product price [product name], is: [calculated gross amount] PLN gross, tax amount is [calculated tax amount] PLN. ” Data from the form are to be saved to a separate CPT. In addition to the data from the form should also sign up IP and date of completing the form." - thats my task if(!empty($_SERVER["HTTP_CLIENT_IP"])) { $ip = $_SERVER["HTTP_CLIENT_IP"]; } elseif(!empty($_SERVER["HTTP_X_FORWARDED_FOR"])) { $ip = $_SERVER["HTTP_X_FORWARDED_FOR"]; } else { $ip=$_SERVER["REMOTE_ADDR"]; } …
Category: Web

I changed the site address and wordpress address from localhost to my ip and it doesn't work anymore

The problem: I'm running wordpress locally on a mac using mamp. I used to access my wordpress site with localhost:8888/mysite. I wanted to let other people see it using my IP address so I went under SETTINGS-GENERAL in Wordpress and changed the "Address URL" and "SITE URL" from 'localhost' to my IP address. I tried to reach the site with myIP:8888/mysite and it's broken. I tried to reach it through localhost:8888/mysite and it automatically redirects the browser to myip:8888/mysite. I …
Category: Web

Restricting user login by IP address

I have a website that is login required in order for users to view the website. I have set up one user for all internal members to use to view the website, however i want to limit just that user to our specific IP address. I can see you can limit access site-wide to an IP address via htaccess, but i only need to implement it for one user, so they can only view the website from our IP address. …
Category: Web

Broken CSS after changing the site URL

I have a self-hosted Wordpress blog on my home server. Previously I accessed it directly via its original IP address taken from DHCP, but now I have configured a static IP address for it. The problem is that now all the CSS is broken. I have updated my wp-config.php file adding the following two lines: define('WP_HOME','http://192.168.0.100/myblog/'); define('WP_SITEURL','http://192.168.0.100/myblog/'); and I have restarted apache, but the CSS is still broken. Is there some other configuration file that I should update?
Category: Web

Limiting sessions to one IP at a time

On a site with premium user account subscriptions, I'd like to be able to limit logins to one computer at a time. The most straightforward way to accomplish this would be to limit by IP, but I haven't had any luck finding a plugin to accomplish this. Does anybody know of one I can use to get this functionality? Related: Login security question - Does WP show me if I'm logged in from multiple locations?
Category: Web

block IP wordrpess for the next X minutes

I would like to implement same example from here, about not allow you to publish another question after 40 minutes of your first question. I have a Wordpress site and users ( register and no register) can submit post. That should be a really good idea to not allow users (checking IP ) to publish in the next 40 minutes for example if they actually published something. Anybody can help me? Thank for all ;)
Topic: ip Wordpress
Category: Web

Accessing WP multisite via IP instead of domain

I have a WP multisite installation protected with a firewall service which I cannot disable. Now, I need to access a particular site within the multisite installation via IP. I got the absolute path to the installation (/usr/www/users/multisite/site1/). So, I have been trying to access it with the URL IP/usr/www/users/multisite/site1/ and it says the page doesn't exist (404). I also deleted one by one the directories in the URL starting with 'usr' and yet I couldn't access it. Any suggestion …
Category: Web

Store brute-force IP addresses

How can I store IP addresses which try to brute-force the login section or to login too frequent too fast? I need to store all IPs, then use them in another application, sort of like a learning routine. UPDATE #1: Here's a scenario (pseudo-code): function my_wp_login_failed($username) { store($username); store($ipAddress); } add_action('wp_login_failed', 'my_wp_login_failed'); How can I do this for all attack vectors? UPDATE #2: I need IP addresses trying to access the site more than X times get blocked for at …
Category: Web

About

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