Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2022-02-03 11:45:01

6sigma
Member
From: Memphis, TN, USA
Registered: 2004-05-24
Posts: 184
Website

Deleting articles...

Bringing an old Txp weblog out of moth balls, I want to do some rust removal. With over 4000 articles, can I delete articles without unexpected consequences? Clearly, I’ll be paying attention to my own links to those articles. How will Txp handle the “gaps” if I delete (for example) article #3041, 3045 & 3047?

At an extreme…if articles 1-1900 were deleted, is there any recovery of those numbers or does Txp just keep adding new articles above 4xxx?

Thanks


“Well, I, uh, don’t think it’s quite fair to condemn a whole program because of a single slip-up, sir.” General ‘Buck’ Turgidson

Offline

#2 2022-02-03 12:25:51

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,271
Website GitHub

Re: Deleting articles...

You can delete any articles you like. Alternatively:

  1. set their status to Hidden if you’re not sure whether you might need it or want to recycle it in future.
  2. set an Expiry date/time for the article (sadly, one by one as there’s no mass Expiry setting… yet).

The gaps in article IDs don’t matter. They’re just for internal use and will carry on incrementing.

Internal links will of course require updating, as you say. And if you’re doing that, a word of advice: don’t include the site domain in the URL. Start at the first slash after the domain, e.g. /article/4734/when-i-was-fifteen.

Search engine/bookmark links to the old articles will of course rot. If you deleted/hid the article then you should put a redirect in place to paper over the hole (smd_redirect is an option). If you set an expiry date then your page template can be told to issue a 410: Gone header for expired articles, which at least tells search engines and visitors that the content used to be here but it’s no longer valid. Nicer than a 404.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#3 2022-02-03 12:46:50

6sigma
Member
From: Memphis, TN, USA
Registered: 2004-05-24
Posts: 184
Website

Re: Deleting articles...

Thanks! Exactly what I need to know!


“Well, I, uh, don’t think it’s quite fair to condemn a whole program because of a single slip-up, sir.” General ‘Buck’ Turgidson

Offline

#4 2022-02-03 15:50:35

gaekwad
Server grease monkey
From: People's Republic of Cornwall
Registered: 2005-11-19
Posts: 4,137
GitHub

Re: Deleting articles...

6sigma wrote #332626:

With over 4000 articles, can I delete articles without unexpected consequences?

For completeness, and to save your hands / wrists from melting, your browser may allow you to select batches of articles via the checkboxes: find the list of articles you want to zap, select the top checkbox, then hold Shift and select the bottom checkbox.

Unsolicited advice: take a backup first, take your time over it, and don’t do it with tired eyes. There’s a risk the wrong articles can be zapped if you get too caught up in things without paying attention. Better to take your time over it and get it right than go racing through and have to restore from backup when the wrong thing gets deleted. Been there, done that many times.

Offline

Board footer

Powered by FluxBB