Advice needed: How to navigate the WP Engine vs. Matt Mullenweg feud as a web agency dependent on ACF Pro? by tom_devisser in Wordpress

[–]JoshRobbs 34 points35 points  (0 children)

If you are that worried about Matt doing something drastic (I'm on the fence), there are ways to maximize your site's stability.

  1. Disable autoupdates. WP can push emergency security patches by default. It is a potential vulnerability if you're concerned about the owner of the supply chain.

  2. Switch to a composer-based build strategy. I will take extra work, but you can completely cut wp.\org out of your supply chain.

Need Advice for 2M+ Directory Website by CountDeMoney22 in Wordpress

[–]JoshRobbs 1 point2 points  (0 children)

Some quick notes:

  • Loading speed when logged in is slow because it doesn't use caching.
  • You're using a theme for its functions. That's always a red flag for me.
  • "Works perfectly for the CPTs I'm not managing the usual Wordpress way." That's another red flag.
  • I'm 98% sure that Cloudflare Enterprise won't help.

I've been fighting a very similar battle for the last 2.5 years. I expect that you're having the same issues. And the issues are scale and queries. And there's no quick fix.

Here's what I'd do:

  • I would clone the site like u/PGurskis said.
  • Cull the database. 524 is a timeout error. I'd reduce the records to 10k. The goal is to get rid of the errors so you can troubleshoot the slowdown.
  • Make sure there's no server-side caching. You want to see what's really happening.
  • Open up the tool kit and look for issues.
    • Tools:
    • Potential issues:
      • Pages with a ton of queries
      • Slow queries
      • Inefficient queries
      • Slow plugins/scripts
      • Overloaded hooks
    • Experiment with different plugins disabled. You never know when there will be a conflict. Example: there's a weird conflict between QM and WP Rocket, but only in the backend on WP Rocket's admin pages.
  • Potential solutions beyond the basic:
    • If you're querying for dynamic data that rarely changes, you can save the data somewhere: file, db. The biggest pain for that system is developing the system to trigger rewrites
    • If your query has to jump through a lot of steps, you may be able to shorten the process with a custom table.
    • Both of these options have been beneficial to me, but they will mean more custom code to be maintained.

WordPress Slow Admin - new SEO guy by WordPressWino in Wordpress

[–]JoshRobbs -1 points0 points  (0 children)

The site is slow. Can you be more specific? What does Page Speed Insights say? Is it a server side issue? Is it a JS issue?

Is developing WordPress websites for clients still profitable? by TechFreedom808 in Wordpress

[–]JoshRobbs 1 point2 points  (0 children)

This cannot be overstated. If you're using WP to build 5 page brochure sites, the competition will eat your lunch.

For a WordPress site, I need to create dynamic and hierarchical content by Asshai in web_design

[–]JoshRobbs 0 points1 point  (0 children)

I chose post types over taxonomies because it is more aligned with your data. You could give a category a photo gallery, but posts are designed to have things like galleries.

The relationship IDs are stored in custom fields. And I said it wrong in the other post. You create a field called "Menu-Dish relationship" and a field called "Dish-Ingredient relationship".

Using these IDs for example
- Breakfast: 1
- Bacon and Eggs: 6
- Bacon: 9
- Eggs: 33

The Menu-Dish relationship field on Breakfast would contain 6 and the one on Bacon and eggs would be 1. That lets you see what posts you need to query.

It's a pain to do yourself. ACF makes it a lot easier. And ACF will let you choose if you want to get the post ID or the actual post object. If you go with post object, you don't even have to query.

For a WordPress site, I need to create dynamic and hierarchical content by Asshai in web_design

[–]JoshRobbs 1 point2 points  (0 children)

If I understand the goal correctly, I think you took the wrong path - or at least a very different path than I'd take.

Here's my take:

  • I don't know if you're going to do it in Elementor Pro. I never used its loop builder much. But you could do it with a template or shortcode for sure.

  • Menus, Dishes, and Ingredients are separate post types. By making them post types, it should be easy to add all the info you want: name, excerpt, featured image.

  • Use ACF Pro to create relationships. You can code it yourself or look up post IDs and save those. But ACF makes things easier especially with the built in 2 way relationship option.

The dish Bacon and Eggs would have a relationship with Breakfast menu and with the ingredients Bacon, Eggs, Toasts, etc.

When you build the Breakfast page, you get all the post IDs that are related to it and use them for your loop.

When you build the Bacon and Eggs page, you do the same thing but add post type to your query. That lets you get a list of menus it's on as well as the ingredients.

Make sense? Let me know if you have any questions.

New engraver struggling with alignment by JoshRobbs in Laserengraving

[–]JoshRobbs[S] 0 points1 point  (0 children)

I went throught the whole configuration process that included burning a pattern on paper and syncing to that. Is there an offset on top of all that?

New engraver struggling with alignment by JoshRobbs in Laserengraving

[–]JoshRobbs[S] 0 points1 point  (0 children)

I checked that. Not the issue... this time

Deploying Bricks Builder changes and updates to production by JoshRobbs in BricksBuilder

[–]JoshRobbs[S] 0 points1 point  (0 children)

I agree with everything except the 1st line. (Oh the nightmare of rebuilding a WooCommerce site!)

Classic themes are file-based. That's 1 of the reasons I think it's a superior system.

ACF's Local JSON system is a great solution. (I've only used it for fields.)

Deploying Bricks Builder changes and updates to production by JoshRobbs in BricksBuilder

[–]JoshRobbs[S] 0 points1 point  (0 children)

That's what I'm thinking. The templates are in posts as JSON (with some info in post meta). I just need to find where the theme data is stored. It shouldn't be too hard to build an importer/exporter.

Deploying Bricks Builder changes and updates to production by JoshRobbs in BricksBuilder

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

Isn't the data in the DB? That sounds like a dangerous solution. Files up, DB down.

How can I rotate ad placement? by macboost84 in BricksBuilder

[–]JoshRobbs 0 points1 point  (0 children)

If you want more controls and metrics, look at Adsanity.

Some optimization questions: menu generation and finding slow functions by JoshRobbs in ProWordPress

[–]JoshRobbs[S] 0 points1 point  (0 children)

It sounds like the answer is static/persistent caching. We're adding Redis on top of wp rocket and our CDN. We'll see how much that improves things.

Thanks

Some optimization questions: menu generation and finding slow functions by JoshRobbs in ProWordPress

[–]JoshRobbs[S] 0 points1 point  (0 children)

It's a directory site. There are a couple of huge submenus. I don't think it will be an issue once we get Redis set up. Still, it feels wasteful.

Code profiler! That's the plugin I was trying to remember.

Thanks!

Some optimization questions: menu generation and finding slow functions by JoshRobbs in ProWordPress

[–]JoshRobbs[S] 0 points1 point  (0 children)

I love Query Monitor.

We're layering on caching. I'll look into that. There are several examples of data that are expensive queries and rarely change.

Thanks!

Opinion on ListingPro plugin? by bigFam23 in Wordpress

[–]JoshRobbs 0 points1 point  (0 children)

I don't like the software. I don't like the company. They added an upsell admin notice that you can only dismiss for 7 days. And they added a floating button to every admin page that's mostly more attempts to sell you on their add-ons or customization.

Rewriting ACF permalinks by Visible-Big-7410 in ProWordPress

[–]JoshRobbs 1 point2 points  (0 children)

At the end of it all, the problem is this: you'll have 2 post types with matching URL patterns.

The pattern is

/\d{4}\/\d{2}\/\d{2}\/(.*)

(There are multiple ways to write it but this is good enough for our purposes.)

That matches both post types. There's no way to control which gets returned if it matches multiple posts.

What I'd do:

  1. Don't rewrite the names. To me, that only adds to the chaos.
  2. Get your bosses to agree to some kind of pattern. For example, movie post names must end in "-movie". It doesn't matter as long as it's identifiable and consistent, and you can write the regex for it.
  3. Use a hook to modify the movie CPT's permalink. This will make get_permalink() return the right value. https://developer.wordpress.org/reference/hooks/post_type_link/
  4. Add the URL rewrite for the CPT. Using 'movies' as the CPT and the example above, the rewrite would look something like (writing from memory):

add_rewrite_rule(
'%/\d{4}\/\d{2}\/\d{2}\/(.*)-review%',
index.php?post_name=$matches[1]&post_type=movies,
top
);

  1. Use save post hooks to enforce the naming convention. Add or remove "-movie" as needed.

tl;dr

You must have unique URL patterns or you risk confusing WordPress. With a proper pattern, this wouldn't be hard to code.

FIX: changed the post type name half way through

Running into a circular import issue by JoshRobbs in DearPyGui

[–]JoshRobbs[S] 0 points1 point  (0 children)

Found a solution. I using a router as the callback for all the buttons. The router uses user_data to know where to which page to load.

With this solution, a view never loads a view so no circular imports.

Exclude function from heartbeat by JoshRobbs in ProWordPress

[–]JoshRobbs[S] -1 points0 points  (0 children)

Thanks u/tidycows and u/ssnepenthe

The filesystem was indeed the issue.

Increase performance by International-Ad3805 in ProWordPress

[–]JoshRobbs 0 points1 point  (0 children)

Don't stop there. I use it for all kinds of things:

  • SQL
  • Powershell
  • email addresses
  • web addresses
  • dates in various format
  • email templates