Wordpress Memory limit not increasing

I have set 1024M in php.ini file: memory_limit = 1024M I have set it in .htaccess file: <IfModule mod_php7.c> php_value memory_limit 1024M </IfModule> I have set it in wp-config.php file: define( 'WP_MAX_MEMORY_LIMIT' , '1024M'); define( 'WP_MEMORY_LIMIT', '1024M' ); But I still get the following error on a plugin page in my Wordpress admin area: Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 61440 bytes) in /home/eroticnaughtines/public_html/wp-includes/functions.php on line 4212 And yes, all the files are in …
Category: Web

Specific URL has 403 Forbidden status code

I'm debugging a Belgian WP website: slotenmakerbelgie.com. The problem is that I get a forbidden status on a specific URL: slotenmakerbelgie.com/error/ (with and without trailing slash at the end) I really don't understand what's going on. I already have checked the following: Temporary deleted .htaccess Temporary deactivated all plugins Checked empty folders Checked and deleted wp_old_slug_redirect Redirections WordPress settings / files / did an integrity scan (no WP files are modified and uploaded a fresh WP install) I'm really getting …
Category: Web

Reject all malicious URL requests functions.php

this might not be the right place as it's a question about a function snippet that relates also to the server and log files. I have been trying to block access to my site from bad query attempts which show up on my server logs attempting to access pages that don't exist. I found a snippet online with claims that it may stop these kinds of requests, but with very little explanation as to what it exactly does. So can …
Category: Web

Automating svn updates from a server-side cron job

I am running WordPress on Ubuntu with Apache and MySQL. I would like to automatically install minor and security updates to WordPress. However, as I understand it, the standard auto-update mechanism (see also How exactly do automatic updates work?) is ultimately fired off by a web request, meaning that the update process runs as the apache user (for me it's www-data). So the www-data user has to have permissions to write to WordPress's php files. This makes me uncomfortable - …
Category: Web

How to monitor server for error establishing a database connection

I know there are tools like pingdom.com and uptimerobot.com that will monitor your site and let you know if they're down, but I find that my WordPress site is experiencing the dreaded "error establishing a database connection" more often than desired, and I'd like to get some sort of notification when that happens (but not in the form of a user complaint!). Pingdom and Uptimerobot do not consider that an error, and thus do not push any notifications. Are there …
Category: Web

Problems fixing a REST API 404 after Moving my WordPress Directory and updating Permalink Structure

I am running a self-hosted version of WordPress on a Linode VPS running Debian 9. I was previously using WordPress on a /blog directory because I had a basic HTML site that I decided not to keep any longer, so I moved everything out of /blog and put everything back into the root directory after deleting my old site's contents. I followed the steps provided here and updated my permalink settings and used Velvet Blues to update my URLs, as …
Category: Web

Is doing_wp_cron a necessary query string when scheduling cron.php as a cron job?

I have seen various ways to schedule the WordPress cron so that it is triggered by the server. Some will run the php file directory from the crontab and others will use a wget and reference the url. I have noticed some sites suggesting this: wget -q -O - https://domain.com/wp-cron.php?doing_wp_cron >/dev/null 2>&1 What is the difference between this and just using wget -q -O - https://domain.com/wp-cron.php >/dev/null 2>&1
Category: Web

Should I add the IP of the server that hosts my sites to the list of authorized IPs in the wp-admin/.htaccess?

All of my sites were recently hacked and I had to restrict access to the WordPress admin. The logs are now full of denied connections, but I also see errors coming from the IP of the server that hosting them : [access_compat:error] [pid 944] [client XXX.XXX.XXX.XXX:45316] AH01797: client denied by server configuration: /var/www/my-website/wordpress/wp-admin/admin-ajax.php, referer: https://www.my-website.com/wp-admin/admin-ajax.php?action=wp_1_wc_privacy_cleanup&nonce=XXXX where XXX.XXX.XXX.XXX is my server IP Thanks
Category: Web

How to make custom page link to root automatically?

I've put / in my Home custom page link, and locally my server is localhost:3000 and it works fine, but on my server the url is www.mysite.com/theproject, but / there does not lead to www.mysite.com/theproject but to www.mysite.com, but for example the logo which has a link like so <?= esc_url(home_url('/')); ?> works fine on the server. Any way to make the custom page link behave like it has <?= esc_url(home_url('/')); ?> ?
Category: Web

Problems with WordPress multisite directories/url structures and admin access after migration

I'm trying to migrate a multisite WP installation to a new server. The network consists of a simple parent site that redirects users to one of four subsites based on their location. E.g. if a user from the UK visits the site, they're redirected to the site.com/uk subsite. Before the migration, each subsite's theme & plugin resources (images, css, js etc.) were available from the subsite's url, e.g. site.com/uk/wp-content/themes/uk-theme/images/image.svg. After migrating the site to the new server, the resources are …
Category: Web

Using Custom Javascript and pHp to send email to myself when a user clicks on an input button but only works on Chrome, IE, and Micorosft Edge

So I am using jQuery and pHp together to send an email to myself whenever a user clicks on the update button of their Ultimate Member form. However, the email only sends when a user is using Chrome, IE, and Microsoft Edge. When using Safari and Firefox, it doesn't work. I am using a click event listener to send JSON to my pHp file. The JSON was originally an object that was created by a function that checks for the …
Category: Web

Can I achieve this with Wordpress?

Feels nice to be part of StackExchange. I used to make websites with wordpress around 8 years ago but now I’m a bit out of the loop. Well I was given an offer to make a website with a bit of unusual combination of features. My question is, can I create all these features with the plugins available today. The features are the following: Create a login system for customers with bank card details ready for payments. Allow the customers …
Category: Web

WordPress PHP version/info not being picked from cPanel PHP Version values

Within my WordPress dashboard, I am receiving the error that my PHP version needs to be updated to v7.4 as it currently shows v5.6.40. The thing is, I have actually gone into the cPanel for this website and updated the PHP version to 7.4, as well as some other option values. From what I can see, it doesn't seem to be picking up any of these changes at all, from WordPress as when looking at Tools > Site Health > …
Category: Web

Connect to Ms SQL Server

I've been asked to develop custom plugins which will connect to a database hosted on MS SQL Server in different geographical location, i.e the website is hosted with a hosting service and the database is hosted within the businesses office. I have no idea how to go about remotely connecting the SQL server. Any advice people may offer would be greatly appreciated.
Category: Web

Wordpress shows front page, when it should show 404 with pagination style urls

Whenever I type a url for my site that contains three slashes "/" wordpress shows the front page instead of a 404.For example: example.com/something/does/notexist goes to frontpage, where example.com/something/doesnotexist/ correctly shows a 404. I added several debug tools to see what's happening. The rewrite rule explorer shows that no rule matched the request. Yet the front page is loaded. I assume this is related to pagination requests like /something/page/3. What I don't understand is why wordpress does not actually do …
Category: Web

How to queue API requests with PHP in WordPress?

I'm developing a plugin to manage some simple custom APIs. I'd like to handle clients requests to APIs with a queue, so as not to handle all requests in parallel but one at a time, with a FIFO logic: when one request has been satisfied, the next one in the queue is processed and so on ... I tried to use the Pheanstalk library but the server responds with error 500, as a development environment I am using Devilbox, how …
Category: Web

Is there a way to pass google webmaster CLS on WordPress website?

I have developed WP theme for 3 webisites. Both are using pure WP codex code. No frameworks, nothing. The only thing I use is WP bakery PB plugin. But still it is not passing the CLS. I am switching the theme to Twentytwenty or any other default WP theme, turning of all the plugins, but still CLS is going MAD! For that reason I bought a VPS 12 cores, 16gb RAM. Running CentOS -> CyberPanel with Open Light Speed server, …
Category: Web

Sequence of finding a website when they are running Wordpress

So, as I understood it. The browser asks for a website, say, myWebsite.com. After churning around the internet where that site is reached and the request is passed to the server software, I’m assuming Apache (doesn’t matter). Apache then finds the file MyWebsite.com/index and sends it back to the browser. But if MyWebsite.com is running Wordpress how does it know that and launch Wordpress rather than looking for my “index” file?
Category: Web

Ajax action has 200 status but response of No response data available for this request

I'm developing a custom plugin that implements an ajax-powered search form on a WordPress site. It runs a WordPress query and outputs the results just below the search box where a user types their search string. Locally in my development environment, the plugin works fine. But when I install it on my production server it does not work. According to the Chrome dev tools, the XHR action for my form submission is returning 200 status but the response says No …
Category: Web

About

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