As a general rule, diesel particulate filters are welded into exhaust systems, meaning that removing a DPF from a vehicle often requires the removal of large parts of the exhaust system from the vehicle to permit cutting the DPF from the exhaust system (as shown above) without damaging the vehicle.
Note also that in cases where a DPF is bolted into the exhaust system with flanges, or as a part of the exhaust manifold, it may be necessary to remove or partially disassemble major components to gain access to the bolts or other fasteners. Such components could include the radiator and its hoses, A/C condenser and various A/C lines, power steering lines, splash guards, and/or exhaust heat shields, as well as one or more cosmetic engine covers.
Moreover, performing a DPF replacement on a DIY basis also requires access to a vehicle lift or at a minimum, a set of vehicle ramps to lift the vehicle off the ground. In addition, you would also need tools and equipment that include, but are not limited to, an angle grinder, specialized welding equipment, and a comprehensive mechanic's tool set, as well as safety equipment like a fire extinguisher, welding gloves, welding helmet, and approved safety goggles or an approved face shield. Note that you'd also need the skills required to operate and use the listed equipment safely to avoid sustaining potentially serious and even life-threatening personal injuries.
So, to answer the question of whether it is possible to replace a DPF on a DIY basis: sure, it is possible, but only if you have the skills, equipment, tools, and technical knowledge that are equal to that of a professional mechanic.
In practice, this means that for most car owners, the risk of sustaining serious personal injuries or causing potentially severe damage to a vehicle far outweighs the advantages of saving a few dollars by replacing a DPF themselves. Therefore, unless you are as skilled and knowledgeable as a professional mechanic is, we do NOT recommend that you attempt a maintenance task as complex and potentially dangerous as replacing a DPF or, for that matter, any other exhaust component(s).