The name of the city is usually spelled Essaouira in Latin script, and الصويرة in Arabic script. Both spellings represent its name in Moroccan Arabic, ṣ-Ṣwiṛa. This is the diminutive (with definite article) of the noun ṣuṛ which means "wall (as round a yard, city), rampart". The pronunciation with pharyngealized /ṣ/ and /ṛ/ is a typically Moroccan development. In Classical Arabic, the noun is sūr (with plain /s/ and /r/), diminutive suwayrah. Hence the spelling of the name in Arabic script according to the classical pronunciation is السويرة al-Suwayrah (with sīn not ṣād).
In the Berber language which is spoken by a sizeable proportion of the city's inhabitants, it is called "Taṣṣort", meaning 'the small fortress'.
In Moroccan Arabic, a single male inhabitant is called ṣwiṛi, plural ṣwiṛiyin, a single female inhabitant is ṣwiṛiya, plural ṣwiṛiyat. In the Berber language, a single male inhabitant is U-Taṣṣort, plural: Ayt Taṣṣuṛt, a single female inhabitant is Ult Taṣṣort, plural 'Ist Taṣṣort.
Until the 1960s, Essaouira was generally known by its Portuguese name, Mogador. This name is probably a corruption of the older Berber name Amaqdūl that is mentioned by the 11th-century geographer al-Bakrī.
Archaeological research shows that Essaouira has been occupied since prehistoric times. The bay at Essaouira is partially sheltered by the island of Mogador, making it a peaceful harbor protected against strong marine winds.
Essaouira has long been considered as one of the best anchorages of the Moroccan coast. The Carthaginian navigator Hanno visited in the 5th century BC and established the trading post of Arambys.
Around the end of the 1st century BCE or early 1st century CE, the Berber king Juba II established a Tyrian purple factory, processing the murex and purpura shells found in the intertidal rocks at Essaouira and the Iles Purpuraires. This dye colored the purple stripe in Imperial Roman Senatorial togas.
A Roman villa was excavated on Mogador island. A Roman vase was found as well as coinage from the 3rd century CE. Most of the artifacts are now visible in the Sidi Mohammed ben Abdallah Museum and the Rabat Archaeological Museum.
During the Middle Ages, a Muslim saint named Sidi Mogdoul was buried in Essaouira, probably giving its origin to the name "Mogador".
In 1506, the king of Portugal, D. Manuel I, ordered a fortress to be built there, named Castelo Real de Mogador. Altogether, the Portuguese are documented to have seized six Moroccan towns and built six stand-alone fortresses on the Moroccan Atlantic coast, between the river Loukos in the north and the river of Sous in the south. Four of them only had a short duration: Graciosa (1489), São João da Mamora (1515), Castelo Real of Mogador (1506–10) and Aguz (1520–25). Two became permanent urban settlements: Santa Cruz do Cabo de Gué (modern Agadir, founded in 1505–06), and Mazagan, founded in 1514–17. Following the 1541 Fall of Agadir, the Portuguese had to abandon most of their settlements between 1541 and 1550, although they were able to keep Ceuta, Tangier and Mazagan.
The fortress of Castelo Real of Mogador fell to the local resistance of the Regraga fraternity four years after its establishment, in 1510.
During the 16th century, powers including Spain, England, the Netherlands and France tried in vain to conquer the locality. Essaouira remained a haven for the export of sugar, molasses and the anchoring of pirates.
France was involved in an early attempt to colonize Mogador in 1629. As Richelieu and Père Joseph were attempting to establish a colonial policy, Admiral Isaac de Razilly suggested they occupy Mogador in 1626, which he had reconnoitered in 1619. The objective was to create a base against the Sultan of Marrakesh and asphyxiate the harbour of Safi.
He departed for Salé on 20 July 1629 with a fleet composed of the ships Licorne, Saint-Louis, Griffon, Catherine, Hambourg, Sainte-Anne, Saint-Jean. He bombarded the city the Salé, destroyed three corsair ships, and then sent the Griffon under Captain Treillebois to Mogador. The men of Razilly saw the fortress of Castelo Real in Mogador and landed 100 men with wood and supplies on Mogador island, with the agreement of Richelieu. After a few days, however, the Griffon reimbarked the colonists and departed to rejoin the fleet in Salé.
After these expeditions, France signed a treaty with Abd el-Malek II in 1631, giving France preferential treatment, known as "capitulations": preferential tariffs, the establishment of a Consulate, and freedom of religion for French subjects.
The present city of Essaouira was built during the 18th century. Mohammed III, wishing to reorient his kingdom toward the Atlantic for increased exchanges with European powers, chose Mogador as his key location. One of his objectives was to establish a harbour at the closest possible point from Marrakesh. The other was to cut off trade from Agadir in the south, which had been favouring political rival of Mohammed III, and the inhabitants of Agadir were forced to relocate to Essaouira.
For 12 years, Mohammed III directed a French engineer, Théodore Cornut, and several other European architects and technicians to build the fortress and city along modern lines. Originally called "Souira" ("the small fortress"), the name became "Es-Saouira" ("the beautifully designed").
Thédore Cornut designed and built the city itself, particularly the Kasbah area, corresponding to the royal quarters and the buildings for Christian merchants and diplomats. Other parts were built by other foreigners. The harbour entrance, with the "Porte de la Marine", was built by an English renegade by the names of Ahmed el Inglizi ("Ahmed the English") or Ahmed El Alj ("Ahmed the Renegade"). The two "scalas" with their fortifications (the Harbour scala and the Northern scala) were built by Genoese engineers.
Mohammed III took numerous steps to encourage the development of Essaouira: the harbour of Agadir to the south was closed off in 1767, so that southern trade should be redirected through Essaouira. European communities in the northern harbour of Rabat-Salé were ordered to move to Essaouira through an ordinance of January 21, 1765.
From the time of its rebuilding by Muhammad III until the end of the nineteenth century, Essaouira served as Morocco's principal port, offering the goods of the caravan trade to the world. The route brought goods from sub-Saharan Africa to Timbuktu, then through the desert and over the Atlas mountains to Marrakech. The road from Marrakech to Essaouira is a straight line, explaining the king's choice of this port among the many that the Moroccan coast offers.
Mohammed ben Abdallah encouraged Moroccan Jews to settle in the town and handle the trade with Europe. Jews once comprised 40% of the population, and the Jewish quarter (or mellah) contains many old synagogues. The town also has a large Jewish cemetery. The city flourished until the caravan trade died, outmoded by direct European trade with sub-Saharan Africa. As of 2017, Essaouira has only three Jewish inhabitants.
In the 19th century, Essaouira became the first seaport of Morocco, with trade volumes about double those of Rabat. The city functioned as the harbour for Marrakesh, as it was only a few days from the inland city. Diplomatic and trade representations were established by European powers in Essouira. In the 1820, European diplomats were concentrated in either Tangiers or Essaouira.
Following Morocco's alliance with Algeria's Abd-El-Kader against France, Essaouira was bombarded and briefly occupied by the French Navy under the Prince de Joinville on August 16, 1844, in the Bombardment of Mogador, an important battle of the First Franco-Moroccan War.
From 1912 to 1956, Essaouira was part of the French protectorate of Morocco. Mogador was used as a base for a military expedition against Dar Anflous, when 8,000 French troops were located outside of the city under the orders of Generals Franchet d'Esperey and Brulard. The Kasbah of Dar Anflous was taken on 25 January 1913. In 1930, brothers, Michel and Jean Vieuchange used Essaouira as a base before Michel set off into the Western Sahara to try to find Smara.
France had an important administrative, military and economic presence. Essaouira had a Franco-Moroccan school, still visible in Derb Dharb street. Linguistically, many Moroccans of Essaouira speak French fluently today.
In the early 1950s film director and actor Orson Welles stayed at the Hotel des Iles just south of the town walls during the filming of his 1952 classic version of "Othello" which contains several memorable scenes shot in the labyrinthine streets and alleyways of the medina. Legend has it that during Welles's sojourn in the town he met Winston Churchill, another guest at the Hotel des Iles. A bas-relief of Orson Welles is located in a small square just outside the medina walls close to the sea. It is in a neglected state being covered in bird droppings, graffiti and with a broken nose. In addition, the dedication plaque below it has been stolen (as of Dec 2008). Several other film directors have utilised Essaouira's photogenic and atmospheric qualities.
Beginning in the late 1960s, Essaouira became something of a hippie hangout. Despite common misconception, Jimi Hendrix's song "Castles Made of Sand" was written in 1967, two years before he visited the castles of Essaouira.
Essaouira is protected by a natural bay partially shielded from wave action by the Iles Purpuraires. A broad sandy beach extends from the harbour south of Essaourira, at which point the Oued Ksob discharges to the ocean; south of the discharge lies the archaeological ruin, the Bordj El Berod. The Canary Current is responsible for the generally southward movement of ocean circulation and has led to enhancement of the local fishery. The village of Diabat lies about five kilometres (3.1 miles) south of Essaouira, immediately south of the Oued Ksob.
Essaouira connects to Safi to the north and to Agadir to the south via the N1 road and to Marrakech to the east via the R 207 road. There is a small airport some 7 to 8 km (4 to 5 mi) away from the town, which schedules several flights a week to Paris-Orly and daily to Casablanca.
Essaouira's climate is mild semi-arid (BSn) bordering a warm summer Mediterranean one (Csb). The gap between highs and lows is small and summers are warm while winters are mild. Annual rainfall is usually 300 to 500 millimetres (12 to 20 in). Essaouira's climate is akin to coastal Los Angeles, specifically Santa Monica in California.
The Medina of Essaouira (formerly "Mogador") is a UNESCO World Heritage listed city, an example of a late 18th-century fortified town, as transferred to North Africa by European colonists. Major problems currently are deterioration of the extensive ramparts around the Medina; and widespread violation of laws against motorized vehicles (primarily mopeds) within the Medina.
There are only a handful of modern purpose-built hotels within the walls of the old city. Newer international hotels have been built along the sea front – the local planning regulations restrict buildings to 4 storeys high to help preserve the stunning views. There are also many privately owned riads, also known as dars, that may be rented on a daily or weekly basis.
The medina is home to many small arts and crafts businesses, notably cabinet making and 'thuya' wood-carving (using roots of the Tetraclinis tree), both of which have been practised in Essaouira for centuries.
The fishing harbour, suffering from the competition of Agadir and Safi remains rather small, although the catches (sardines, conger eels) are surprisingly abundant due to the coastal upwelling generated by the powerful trade winds and the Canaries Current. Essaouira remains one of the major fishing harbours of Morocco.
Essaouira is also renowned for its kitesurfing and windsurfing, with the powerful trade wind blowing almost constantly onto the protected, almost waveless, bay. Several world-class clubs rent top-notch material on a weekly basis. The township of Sidi Kaouki is located 25 km south of Essaouira and is becoming one of the best locations in Morcco for surfing, windsurfing and kitesurfing. There are several businesses in Sidi Kaouki which offer gear rental.
Essaouira is also a center of argan oil production. It has become a tourist attraction due to the tree-climbing goats who are unique to the region, as argan trees are the only type the goats climb.
Culinary classes can also be offered.
There is a French international school in Essaouira, Groupe scolaire Eric-Tabarly.
Essaouira presents itself as a city full of culture: several small art galleries are found all over the town. Since 1998, the Gnaoua Festival of World Music is held in Essaouira, normally in the last week of June. It brings together artists from all over the world. Although focussed on gnaoua music, it includes rock, jazz and reggae. Dubbed as the "Moroccan Woodstock" it lasts four days and attracts annually around 450,000 spectators.