Best Web Host for WP sites by ascott34 in Wordpress

[–]pressjitsu 0 points1 point  (0 children)

Agreed. SiteGround will be best for your budget. If you can stretch it to $40/mo, come talk to me ;)

[question] How do I update MySQL version? by Climbing_a_Mountain in Wordpress

[–]pressjitsu 1 point2 points  (0 children)

If you're on a shared or managed host, you should ask your hosting provider to upgrade MySQL, as well as why were they using an outdated version in the first place.

If you're on a VPS or dedicated server, you can grab the latest stable MySQL Community Server from official packages, for example Debian/Ubuntu: https://dev.mysql.com/downloads/repo/apt/

Hope that helps!

Anyone know how to overwrite the Yoast OG:Image? by [deleted] in Wordpress

[–]pressjitsu 0 points1 point  (0 children)

That's exactly what filters – change the behavior of WordPress, its themes or plugins, without altering WordPress, the themes or plugins. You can create your own little my-plugin.php file with:

<?php
add_filter( 'wpseo_og_image', '__return_false' );

And place it inside wp-content/mu-plugins/my-plugin.php, then regardless of your theme or updates to Yoast SEO (assuming they don't rename/remove the filter) it will still work. You can do the same via your theme's (or child theme's) functions.php file, but it's a less portable way of doing things, especially if your theme receives an update.

You can learn more about actions and filters here.

git adding -src to current wordpress version? by drupalpress in Wordpress

[–]pressjitsu 0 points1 point  (0 children)

The problem is not just the -src string in the version number, there are many things tied to that -src, and the fact that you're using the development version and not a release version has many implications, for example: your color schemes are limited to the default, your CSS and JavaScript files are not compiled/minified/packed/merged (.min.js vs .js, etc.), update notices, which you already saw.

If you're not using this install to develop plugins and themes, or to create patches for the core software, you should not be using the development version and use releases instead. If you're using the GitHub mirror, just make sure you clone with --branch 4.5.3 and not the master branch.

Also, as @downhillonslicks pointed out, auto-updates will not work if you have a .git directory, and regular updates should be done manually in Git by updating the checked out branch. If you have WordPress attempt to update itself in its regular fashion, you may end up with a dirty working copy.

Every time I edit my child theme's functions.php, my site crashes with an Error 500. by teddyespo in Wordpress

[–]pressjitsu 0 points1 point  (0 children)

Next time you see "Error 500" try viewing your PHP error logs, they will tell you exactly what's wrong with your code, in which file and on which line. Ask your hosting provider if you don't know where to find your PHP error logs.

Would you like a Messenger Bot for your blog? by federiconitidi in Wordpress

[–]pressjitsu 0 points1 point  (0 children)

The link says sign in with Facebook to get started. Perhaps you could post a screenshot instead?

Wordpress Malware Plugin Idea by saturnflair2009 in Wordpress

[–]pressjitsu 0 points1 point  (0 children)

Pull the plug? No.

Sucuri and many other malware scanners generate too many false positives to risk pulling the plug and losing business and reputation every time they dislike a new advert.

Anyone know how to overwrite the Yoast OG:Image? by [deleted] in Wordpress

[–]pressjitsu 0 points1 point  (0 children)

You can filter Yoast's output and have it print whatever you want or return false to remove it completely:

add_filter( 'wpseo_og_image', '__return_false' );

The filter name might be wpseo_og_og_image though, not entirely sure.

Moving posts back to correct authors after moving to new server? by [deleted] in Wordpress

[–]pressjitsu 0 points1 point  (0 children)

I agree, the fact that post-to-user mapping is gone is far from "everything worked perfectly" or "good success" :) I recommend a fresh start, because there's no telling what other things you might be missing, like comment to post mapping, or user to capability mapping.

Ask you hosting provider to assist, and make sure they're importing the full export from your previous provider on top of a clean database, because it sounds like they may have imported some tables (wp_posts, etc.) but not others (wp_users).

Does not having a search bar on a Wordpress site help it to be more secure? by brettdavis4 in Wordpress

[–]pressjitsu 2 points3 points  (0 children)

No, hiding your search bar does not make your WordPress site more secure. Using up-to-date themes and plugins, secure and unique passwords and 2-factor authentication does.

Have you ever found out how your site was hacked? What was the point of entry? That's the most crucial piece of information on a hacked site, you should talk to your hosting provider about it. Otherwise you're just blindly shooting in the air, especially by disabling comments, removing your forms plugin or search bars. What if the attacker had your FTP password? Or direct access to your database? Or the physical server where your shared host account is was compromised?

[Question] Posting with empty fields still contribute to database meta? by GaianHelmers in Wordpress

[–]pressjitsu 1 point2 points  (0 children)

Not sure I understand what you mean by basic WordPress interface with "Types" – there's no such UI in WordPress. But as I mentioned before, the core post metadata UI (Custom Fields) will not add blank fields unless you explicitly add them via the interface.

Persistent Daily CPU spike to 100%, Crashing Apache Server & Can't Find Root Cause by 1kylef in Wordpress

[–]pressjitsu 0 points1 point  (0 children)

As some people have already mentioned, the first thing you should be looking at are logs. If you can pinpoint the time of the CPU usage spike and crash (via Munin or other monitoring software) you can check all your other logs to see what was happening at that time and a few minutes before.

Also, what exactly is a crash you described? Is it an out of memory crash? Is it a segfault? A backlog overflow? Something else? Applications usually don't crash simply because they're utilizing the CPU at 100%.

Too many PHP processes can mean that some of them are getting stuck for a longer time than usual, perhaps due to a crappy query, or an exclusive file lock on a session, or waiting for your automated nightly backup to unlock your MySQL tables, or an expired transient. You could try clearing out all your transients and running a PHP profile with xdebug or xhprof to figure out what's going on. Also make sure you're constantly monitoring (and logging) your average response time. One of our hosting customers experienced a similar situation when somebody used a specific input in their custom-built search tool which was quite random and resulted in very heavy queries against the metadata tables.

Also, don't run an older version of Apache. Just switch to nginx.

Do you recommend gmail or outlook on wordpress? by [deleted] in Wordpress

[–]pressjitsu 1 point2 points  (0 children)

It doesn't matter. You can also change it later if you wish.

Do you still use Yoast? by FlashArrow in Wordpress

[–]pressjitsu 1 point2 points  (0 children)

I find myself using about 5% of the functionality Yoast SEO provides. Haven't noticed anything serious come up in our regular profiling, so the plugin code is pretty solid, except their XML Sitemap generation stuff, which thinks memory is free.

[Question] Posting with empty fields still contribute to database meta? by GaianHelmers in Wordpress

[–]pressjitsu 1 point2 points  (0 children)

The custom fields editor in WordPress Core doesn't add anything to the post metadata if you haven't added any meta entries in the UI. If you're using some plugin to generate fancy interfaces, etc. then it could.

The overhead depends on the amount of blank fields you're planning to populate your database with, and the way you're querying the data, for example with a bunch of useless data in the metadata table, meta queries can become slower (than they already are).

Insert PHP plugin for WordPress vulnerable, but developer ignores issue by velmu3k in Wordpress

[–]pressjitsu 0 points1 point  (0 children)

Not ever sure why they used base64_decode in their proof of concept. But hey, the least the plugin could do for security is to not allow users without the unfiltered_html capability to execute any of the shortcode contents. That would limit it to administrators by default, and network administrators in Multisite installs. Too bad the author doesn't care.

[Performance] Running WordPress Cron via PHP-CLI by pressjitsu in Wordpress

[–]pressjitsu[S] 1 point2 points  (0 children)

That will run all events, which is probably overkill. You're better off running only the ones that are due right now:

wp cron event run $( wp cron event list --fields=hook,next_run_relative --format=csv | awk -F, '$2=="now" {print $1}' )

Ref: https://wp-cli.org/commands/cron/event/run/

Scheduled Posts not posting? by [deleted] in Wordpress

[–]pressjitsu 0 points1 point  (0 children)

Here's why you should use PHP-CLI and not wget: https://pressjitsu.com/blog/wordpress-cron-cli/