In an electric circuit, a thick copper wire is placed. If we place a small compass near to this copper wire it deflects, thus it creates a magnetic field. If it creates a magnetic field then why can't it attract magnets or iron filings?
This is untrue. It can attract magnets and iron filings (a compass needle is a magnet).
Your observation otherwise is likely that the magnetic force is not strong enough to overcome static friction on an object. A compass needle spins very easily because there is not much friction at all, but a solid magnet is heavy and needs a large force to move.
Unless your current is strong, the magnetic field from electromagnets is fairly insubstantial. Moving compass needles is easy, after all they point north naturally whereas if you drop a load of iron filings, they are not going to spontaneously magnetise and point north.