WordPress : résoudre l'erreur "ftp_nlist() expects parameter 1 to be resource" photo

WP-CLI : lister toutes les URLs des articles publiés WordPress

WP-CLI permet de lister très rapidement les articles publiés d’un site WordPress, sans passer par l’administration. C’est pratique pour créer un export d’URLs, préparer une campagne de partage social, auditer un site, vérifier des contenus programmés, ou alimenter un outil externe.

Dans mon cas, j’avais besoin de récupérer les URLs des articles publiés pour les soumettre à SocialBee. Comme l’outil accepte des lots de 100 URLs, WP-CLI est parfait : une commande, une pagination, et c’est plié proprement.

Lister toutes les URLs des articles publiés

La commande de base est très simple :

wp post list --post_type=post --post_status=publish --field=urlLangage du code : PHP (php)

Elle retourne une URL par ligne, uniquement pour les articles publiés.

Les arguments importants sont :

  • wp post list liste les contenus WordPress.
  • --post_type=post limite la requête aux articles.
  • --post_status=publish limite la requête aux contenus publiés.
  • --field=url affiche uniquement l’URL de chaque article.

WP-CLI accepte ici les arguments de WP_Query. Vous pouvez donc filtrer les résultats comme vous le feriez dans une requête WordPress classique.

Lire WP-CLI : lister toutes les URLs des articles publiés WordPress

Portrait of African American abolitionist and writer Frederick Douglass.

African American Life and Resistance Before the Civil War

  1. Puritanism and Expansionism in Early America
  2. The American Revolution: Causes, Independence and Legacy
  3. The New American Nation: Constitution and Early Republic
  4. Jeffersonian America: Expansion, Embargo and the Road to War
  5. America’s Years of Growth: From Monroe to Jackson
  6. American Society in the Early Nineteenth Century
  7. Reform Movements in Antebellum America
  8. O’Sullivan’s Manifest Destiny: Meaning and Legacy
  9. Westward Expansion: America’s Road to the Pacific
  10. Antebellum South: Society, Slavery and Secession
  11. Life on Southern Plantations: Slavery and Resistance
  12. African American Life and Resistance Before the Civil War
  13. North and South Before the American Civil War
  14. The Road to the American Civil War, 1850–1861
  15. The American Civil War: Causes, Battles and Consequences
  16. Reconstruction After the American Civil War

Before the Civil War, African Americans lived under radically different legal conditions, from enslavement in the South to restricted freedom in Northern and Western communities. Enslaved and free Black people nevertheless built families, churches, schools and political organisations while resisting oppression through cultural survival, negotiation, escape, public protest and abolitionism.

African American life before the Civil War cannot be reduced to one experience. Most Black people in the United States were enslaved, but a substantial free population also lived in both Northern and Southern states.

Enslaved people worked on plantations, small farms, docks, construction sites, in factories and inside private households. Free Black Americans worked as sailors, artisans, domestic workers, labourers, teachers, ministers, writers and business owners, although racial discrimination restricted almost every aspect of their lives.

Black resistance also assumed many forms. Armed revolts were exceptional, but resistance occurred daily through family formation, religious practice, education, work slowdowns, preservation of culture, escape and organised political action.

Understanding this history requires more than describing what slavery did to African Americans. It also requires examining how Black people created communities, defended their humanity and influenced the struggle that eventually destroyed legal slavery.

The organisation of plantation slavery is examined separately in Life in the Plantations.

Lire African American Life and Resistance Before the Civil War

Un document d'époque intitulé « Our Roll of Honor » (Notre tableau d'honneur) répertorie les signataires de la « Déclaration des sentiments » issue de la première Convention sur les droits des femmes — un moment emblématique du mouvement réformiste d'avant la guerre de Sécession — qui s'est tenue à Seneca Falls, dans l'État de New York, les 19 et 20 juillet 1848.

Reform Movements in Antebellum America

  1. Puritanism and Expansionism in Early America
  2. The American Revolution: Causes, Independence and Legacy
  3. The New American Nation: Constitution and Early Republic
  4. Jeffersonian America: Expansion, Embargo and the Road to War
  5. America’s Years of Growth: From Monroe to Jackson
  6. American Society in the Early Nineteenth Century
  7. Reform Movements in Antebellum America
  8. O’Sullivan’s Manifest Destiny: Meaning and Legacy
  9. Westward Expansion: America’s Road to the Pacific
  10. Antebellum South: Society, Slavery and Secession
  11. Life on Southern Plantations: Slavery and Resistance
  12. African American Life and Resistance Before the Civil War
  13. North and South Before the American Civil War
  14. The Road to the American Civil War, 1850–1861
  15. The American Civil War: Causes, Battles and Consequences
  16. Reconstruction After the American Civil War

During the decades before the Civil War, Americans organised campaigns against slavery, alcohol abuse, unequal education, abusive institutions and the political exclusion of women. These movements grew from evangelical religion, Enlightenment ideas and confidence in human improvement, but they also revealed conflicts over race, gender, personal liberty and the proper role of government.

The first half of the nineteenth century was an age of rapid social change in the United States. Population growth, territorial expansion, industrialisation and the Market Revolution connected previously isolated communities while disrupting established ways of life.

Many Americans believed that these transformations created both opportunity and disorder. Cities expanded, wage labour became more common and migration weakened older community structures. Reformers responded by attempting to improve individuals, institutions and society itself.

Their campaigns were diverse. Some sought to abolish slavery or extend women’s rights, while others promoted temperance, public schools, prison reform or new religious communities. The movements often shared activists, meeting spaces, newspapers and methods of organisation.

Reform did not always mean liberation. Some reformers defended personal autonomy, but others attempted to impose middle-class Protestant values on workers, immigrants, prisoners and the poor.

The wider social and economic context is examined in American Society in the Early Nineteenth Century.

Lire Reform Movements in Antebellum America