Forum Replies Created

Viewing 10 replies - 1 through 10 (of 10 total)
  • I’m also looking for a solution to this problem… When you add an empty string like the above example I get a 404 page. Even after reseting permalnks.

    Thread Starter granulr

    (@granulr)

    I’m sorry I didn’t explain well enough on this thread… Directory is a custom post type and these always display the post type in the url…

    So the url looks like this /directory/california

    And I need it to be /california…

    So i’m looking for a way to remove the post type from the url

    Thread Starter granulr

    (@granulr)

    That doesn’t work exactly… that just goes to standard url structure.

    Is there a way to remove something in the url string through mod rewrite?

    Just go to the permalinks page in settings… No need to update, but going to the clears permalinks cache

    Thread Starter granulr

    (@granulr)

    Thanks MichaelH this worked perfectly!!!

    Thread Starter granulr

    (@granulr)

    I ran the above code and it seemed to work great…

    I just need to check and make sure everything is there.

    Thread Starter granulr

    (@granulr)

    Thanks MichaelH… But this query gets rid of all duplicates – I need to remove duplicates within all post_id.

    Basically all my posts have a number of custom field’s (facitily_name, facitily_address, facility_state, facility_zip) and for some reason I have duplicates within a post_id. For example I have 4 records for the meta_key facility_name on every post_id.

    Thread Starter granulr

    (@granulr)

    I need a query that will delete all posts in the category Uncategorized…

    I don’t see a table in wp_posts that sets the category

    Doing this in the admin will take forever…

    Thread Starter granulr

    (@granulr)

    fixed this by changing my php.ini memory_limit = 64M

    Thread Starter granulr

    (@granulr)

    Serious CPU/ timeout issues.

    wp_posts table
    total records
    +———-+
    | count(*) |
    +———-+
    | 36395 |
    +———-+

    wp_posts table
    total pages:
    +———-+
    | count(*) |
    +———-+
    | 6602 |
    +———-+

    wp_posts table
    total posts:
    +———-+
    | count(*) |
    +———-+
    | 29620 |
    +———-+

    Approx. 6000 of the total records were inserted directly into the database
    from CSV files so we could bypass entering those records manually.
    Data inserts went into the following tables:

    wp_posts
    wp_postmeta
    wp_term_relationships

    From wp-admin when clicking either pages or posts the CPU kicks into 90% +
    range and the MySQL logs show a loop is taking place and running thousands
    of queries before apache finally timesout.

    Prior to the CSV inserts word press was working fine.

    Below is a snippet of the MySQL logs.

    Does anyone have a clue as to what is going on??

    Any insight will be greatly helpful.

    Thanks

    ********************************************************************************
    The sql log below begins at line 146 of the log file and continues onto
    line 18044 before apache timed out.

    18 Query SELECT ID, post_name, post_parent FROM wp_posts WHERE post_type = ‘page’
    100112 18:45:49 18 Query SELECT * FROM wp_posts WHERE ID = 37340 LIMIT 1
    18 Query SELECT ID, post_name, post_parent FROM wp_posts WHERE post_type = ‘attachment’ AND post_parent = 37340
    18 Query SELECT * FROM wp_posts WHERE ID = 37338 LIMIT 1
    18 Query SELECT ID, post_name, post_parent FROM wp_posts WHERE post_type = ‘attachment’ AND post_parent = 37338
    18 Query SELECT * FROM wp_posts WHERE ID = 37272 LIMIT 1
    18 Query SELECT ID, post_name, post_parent FROM wp_posts WHERE post_type = ‘attachment’ AND post_parent = 37272
    18 Query SELECT * FROM wp_posts WHERE ID = 37175 LIMIT 1
    18 Query SELECT ID, post_name, post_parent FROM wp_posts WHERE post_type = ‘attachment’ AND post_parent = 37175
    18 Query SELECT * FROM wp_posts WHERE ID = 37131 LIMIT 1
    18 Query SELECT ID, post_name, post_parent FROM wp_posts WHERE post_type = ‘attachment’ AND post_parent = 37131
    18 Query SELECT * FROM wp_posts WHERE ID = 36887 LIMIT 1
    18 Query SELECT ID, post_name, post_parent FROM wp_posts WHERE post_type = ‘attachment’ AND post_parent = 36887
    18 Query SELECT * FROM wp_posts WHERE ID = 36706 LIMIT 1
    18 Query SELECT ID, post_name, post_parent FROM wp_posts WHERE post_type = ‘attachment’ AND post_parent = 36706
    18 Query SELECT * FROM wp_posts WHERE ID = 36450 LIMIT 1
    18 Query SELECT ID, post_name, post_parent FROM wp_posts WHERE post_type = ‘attachment’ AND post_parent = 36450
    18 Query SELECT * FROM wp_posts WHERE ID = 36237 LIMIT 1
    18 Query SELECT ID, post_name, post_parent FROM wp_posts WHERE post_type = ‘attachment’ AND post_parent = 36237
    18 Query SELECT * FROM wp_posts WHERE ID = 36235 LIMIT 1
    18 Query SELECT ID, post_name, post_parent FROM wp_posts WHERE post_type = ‘attachment’ AND post_parent = 36235
    18 Query SELECT * FROM wp_posts WHERE ID = 36073 LIMIT 1
    18 Query SELECT ID, post_name, post_parent FROM wp_posts WHERE post_type = ‘attachment’ AND post_parent = 36073
    18 Query SELECT * FROM wp_posts WHERE ID = 35892 LIMIT 1
    18 Query SELECT ID, post_name, post_parent FROM wp_posts WHERE post_type = ‘attachment’ AND post_parent = 35892
    18 Query SELECT * FROM wp_posts WHERE ID = 35837 LIMIT 1
    18 Query SELECT ID, post_name, post_parent FROM wp_posts WHERE post_type = ‘attachment’ AND post_parent = 35837

Viewing 10 replies - 1 through 10 (of 10 total)