New answers tagged

0

Templates might load faster because they don't have to do a database query, they have already all the text hardcoded in them. Also, this might not be the right way to do it and you might have problems or conflicts if you are not doing it right. Considering the fact that the speed diference will be very small, I sugest you should go with a page created in ...


0

If using it on your own server, I wouldnt recommend using a WP plugin as a base, try to configure fail2ban ( a brief tutorial - https://easyengine.io/tutorials/nginx/fail2ban/ ) , it will work like a charm.


1

As per Codex The wp_create_user function allows you to insert a new user into the WordPress database. It uses the $wpdb class to escape the variable values, preparing it for insertion into the database. Then the PHP compact() function is used to create an array with these values. To create a user with additional parameters, use wp_insert_user(). ...


0

If you can add fail2ban to the server, try the wpfail2ban plugin.


1

If the "attack" is distributed, the only thing you can do is to change the url of the login endpoint. This should be easy to do with web server config (block /login and friends, map some other "slug" to wp-login.php). This will also break the automatic redirect from /wp-admin to /login which is a good thing in this case. Don't forget to handle xml-rpc as ...


1

I've been running a highly automated WordPress site with more than 8,500 posts for a year now and my permalink structure of choice is /%post_id%/%author%/%postname%/ This means I can recategorize posts without affecting my permalink and never have to worry if I do something behind the scenes the permalink to a post will never become broken (404 error) and ...


0

No, the wp_get_attachment_image_src function calls image_downsize, which in turn calls image_get_intermediate_size itself. It doesn't cause generation of the images, it is simply getting the relevant images from the meta and choosing the correct one to use.


6

I work with several large WordPress sites, news sites specifically, that have thousands of posts and thousands of visitors (300k/day). With the stuff below, and a well coded theme, with well written queries, we're loading in 2.5s with 7 ad blocks from AdSense and RevContent. Do you have a CDN? I highly recommend a CDN if you don't have one. Depending on ...


3

You've touched on a few things here, and there's both the server and the frontend response time that you're battling with. You might have issues with both. It's worth noting firstly that PageSpeed (and the style recalcuating alert in the Chrome timeline) both deal with front-end aspects only - in slightly different ways though (another good tool to check ...


-2

First load all js on the footer //move js to footer remove_action('wp_head', 'wp_print_scripts'); remove_action('wp_head', 'wp_print_head_scripts', 9); remove_action('wp_head', 'wp_enqueue_scripts', 1); add_action('wp_footer', 'wp_print_scripts', 5); add_action('wp_footer', 'wp_enqueue_scripts', 5); add_action('wp_footer', 'wp_print_head_scripts', ...


0

As I've found, this happens when your html, css or javascript tries to load a resource and you haven't specified a path or wrongly specified root. For instance, I've seen examples on people having this problem while doing <img src="http://example.com" /> background:url(); In my case specifically, was assigning $.ajax() to a global variable so I ...


5

Nginx is really good at concurrency (PHP not so much) so you should try a bit more than 180 requests per second. Maybe 500, or 1000 depending on your server resources and network throughput. The fastcgi_cache is served directly from ram. Wp-super-cache uses php to read a static file from the SSD so I see why it should be faster so why isn't it? It ...



Top 50 recent answers are included